Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-07-06 13:38:49
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Can't make thickbox to work
So, I’ve created a product order form using thickbox to display it.
bla
Look at the source.
I can’t make it work so that when I send the order I’d get the article ID with it. Otherwise I wouldn’t know what product a customer ordered.
The form takes the ID from the first article. But I’ve many articles listed.
I understand that if I’d display one article at one page, I wouldn’t have this issue.
Any suggestions?
This is my form to call thickbox:
<div class=“toote_wrap”> <div class=“toote_vasak”> <txp:if_custom_field name=“tootepilt”><txp:custom_field name=“tootepilt” /></txp:if_custom_field> </div>
<div class=“toote_parem”>
<h3><txp:title /></h3> <txp:body /> <p><a href=”#tell_vorm<txp:custom_field name=“ID” />” rel=“ibox&height=450” title=“Tellimisvorm” >Telli toode</a></p>
<div id=“tell_vorm<txp:custom_field name=“ID” />” style=“display:none;”>
<div style=“color:#000;padding:10px;margin:10px;”>
<txp:zem_contact redirect=“tolmuimejad” to=“name@host.com”> <txp:permlink><txp:title /></txp:permlink><br /> <txp:zem_contact_email /><br /> <txp:zem_contact_secret label=“Artikkel nr.”> <txp:custom_field name=“ID” /> </txp:zem_contact_secret> <txp:zem_contact_text label=“Nimi” /> <txp:zem_contact_text label=“Telefon” /> <txp:zem_contact_text label=“Aadress” /> <txp:zem_contact_textarea label=“Märkused” /> <txp:zem_contact_submit /> </txp:zem_contact>
</div>
</div>
</div>
</div>
Last edited by ricoschette (2010-11-09 10:29:14)
Offline
#2 2007-07-06 15:20:16
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: Can't make thickbox to work
It is probably because that secret <txp:custom_field name=“ID” />
is deep in TXP parsing routine.. I don’t think zem_contact is article aware in anyway. So it’s form inside form inside form so there isn’t article for custom_field.
Have you tried it with asy_wondertag (forum thread here)?
Try replacing that custom_field part inside zem_contact with <txp:asy_wondertag><txp:zem_contact_secret label=“Artikkel nr.”><txp:custom_field name=“ID” /></txp:zem_contact_secret></txp:asy_wondertag>
(probably wont work, the same problem as before) or just <txp:asy_wondertag><txp:zem_contact_secret label=“Artikkel nr.” value="<txp:custom_field name=“ID” />" /></txp:asy_wondertag>
.
(thanks for the tip btw, I was “abusing” comments when I just needed to use zem_contact the way you use it..)
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
#3 2007-07-06 19:43:04
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
tnx, didn’t know about that wondertag thing. I will test it ASAP.
How did you plan to build this kind of thing with comments?
With custom fields it’s easy, but of course the greatest disadvantage is that there’s no “cart”. So a customer can buy one item at the time.
I’m using similar system here as well: Argentum website and I didn’t have any issues there, because you can order only when viewing single article.
Can’t wait the textCommerce to come out.
Offline
#4 2007-07-06 19:50:00
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
just tested it and result is unfortunately negative.
it still gives me the ID of the first article (Kirby_G3 here) :(
Last edited by ricoschette (2007-07-06 19:50:19)
Offline
#5 2007-07-07 07:03:41
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: Can't make thickbox to work
Hmm.. So what was the problem again?-)
All product ordering links open the same tellimisvorm? Not here, if I click G3 -> G3 box opens. G7 -> G7 box opens. The links are fine in html too. But every zem_contact_secret is missing – those blank lines in HTML. Have you tried putting any secret line there? <txp:zem_contact_secret label="Artikkel nr." value="midagi prodid" />
. Does that show in HTML?
Btw, Do you want the article id or that “g*_masin” in the email? Article id is <txp:article_id />
.
If you turn testing/debugging mode on, do you see any errors?
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
#6 2007-07-07 11:25:25
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
The problem still is that zem_contact form can’t pull the article title/article ID/custom field value from the article.
Does it have to show zem_contact_secret lines??
I don’t understand the necessity of value=“smth”. If I could put <txp:article_id /> or <txp:title /> as value, it would be nice…
Yes, I need some identification number, article title or smth to come with the form. Right now, when I send the order, I’ve no idea what article customer ordered. The most important thing is missing.
Right now, the article ID is taken from the first article listed.
I set under preferences status to debugging, but I don’t see any errors.
Anyway, the form I have now looks like this:
<div class=“toote_wrap”>
<div class=“toote_vasak”> <txp:if_custom_field name=“tootepilt”><txp:custom_field name=“tootepilt” /></txp:if_custom_field> </div>
<div class=“toote_parem”> <h3><txp:title /></h3> <txp:body /> <p><a href=”#tell_vorm<txp:custom_field name=“ID” />” rel=“ibox&height=450” title=“Tellimisvorm” >Telli toode</a></p> <div id=“tell_vorm<txp:custom_field name=“ID” />” style=“display:none;”> <div style=“color:#000;padding:10px;margin:10px;”>
<txp:zem_contact redirect=“tolmuimejad” to=”“> <strong><txp:title /></strong><br /> <txp:zem_contact_email /><br /> <txp:asy_wondertag><txp:zem_contact_secret label=“Artikkel nr” value=”<txp:article_id />” /></txp:asy_wondertag> <txp:zem_contact_text label=“Nimi” /> <txp:zem_contact_text label=“Telefon” /> <txp:zem_contact_text label=“Aadress” /> <txp:zem_contact_textarea label=“Märkused” /> <txp:zem_contact_submit /> </txp:zem_contact>
</div> </div> </div>
</div>
Last edited by ricoschette (2010-11-09 10:30:04)
Offline
#7 2007-07-08 10:37:55
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: Can't make thickbox to work
ricoschette: Sorry, it won’t work that way with multiple articles. :( And those zem_contact_secret lines have to be empty in HTML. They can’t be used in that fashion, they reallyreally are secret.
But it can be done, e-mail me.
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
#8 2007-07-08 14:55:35
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
solution found :)
Last edited by ricoschette (2007-07-08 17:05:00)
Offline
#9 2007-08-12 21:31:26
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
Now, I discovered strange thing.
I can’t make <txp:zem_contact_select list=“Option, Option 2, Option 3” selected=“Option” /> inside of that form working.
When you look at the code it says:
<label for=“invalid” class=“zemSelect zemRequired invalid”></label>
<select id=“invalid” name=“invalid” class=“zemSelect zemRequired”>
<option selected=“selected”>Valik</option>
<option>Valik 2</option>
<option>Valik 3</option>
</select>
What’s going on?
Offline
Re: Can't make thickbox to work
You have to set the ‘label’ or the ‘name’ attribute of the zem_contact_select tag to a non-empty value.
Offline
#11 2007-08-13 07:37:43
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
right, tnx.
interesting is that I can’t see the option’s list there.
Offline
#12 2007-08-13 08:54:35
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: Can't make thickbox to work
Anyway, I use checkboxes instead and no problems.
Offline
Pages: 1