View Full Version : Hidden Order Forms
sandlg
22-Apr-2003, 04:02 AM
I'm trying to create a page that will allow users to download hard copy order forms if they don't wish to order over the web. The catch is that my client has three price schedules so based on the login, the page needs to show different information. I'm trying to use the XML tag SHOWFORPRICESCHEDULE on the page (as described in the knowledge base) but it doesn't seem to be working. Could someone look at my code and tell me what I'm doing wrong. Thanks. Ask anyone, I can use all the help I can get!!!
Here's the code:
<!-- BrochureOrderForms HTML begin -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>NETQUOTEVAR:PAGETITLE</TITLE>
<Actinic:BASEHREF VALUE="NETQUOTEVAR:BASEHREF" FORCED=NETQUOTEVAR:BASEHREFFORCED/>
<META NAME="ACTINICTITLE" CONTENT="NETQUOTEVAR:PAGEHEADER">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<!--@act NETQUOTEVAR:HEADERMETA -->
<!--@act NETQUOTEVAR:P3PFULLPOLICYLINK -->
<!--@act NETQUOTEVAR:LOADFUNCTION -->
<LINK REL=STYLESHEET HREF="actinic.css">
<SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
</HEAD>
<body leftmargin="1" topmargin="1" marginwidth="1" marginheight="1" NETQUOTEVAR:BGIMAGE OnLoad="NETQUOTEVAR:ONLOAD" NETQUOTEVAR:BGCOLOR TEXT="NETQUOTEVAR:FGCOLOR" NETQUOTEVAR:LINKCOLOR NETQUOTEVAR:VLINKCOLOR NETQUOTEVAR:ALINKCOLOR>
<table width="760" border="0" cellspacing="0" cellpadding="0" background="hdrbg.gif" align="center">
<tr>
<td><img border="0" src="gd_header2_logo.gif" width="584" height="75"></td>
<td><img src="logo2.gif" width="175" height="75"></td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 width="760" border=0 align="center">
<tr>
<td valign=top background="navbg.gif">
<p><br>
<img height=3 src="shim.gif" width=1 border=0><br>
NETQUOTEVAR:HEADERGUIDE<br>
</p>
<br>
</td>
<td valign=top width="626" background="bk.gif" height="100%"><!-- If customer accounts are in operation following two lines allow displaying -->
<!-- User name and customer account name on every page -->
<Actinic:NOWSERVING/> <Actinic:CURRACCOUNT/><Actinic:BROCHURE_LOGOUT_SIMPLE/><!-- NETQUOTEVAR:REGISTEREDLOGIN --> NETQUOTEVAR:BROCHUREBODY</td>
<Actinic:SHOWFORPRICESCHEDULE Schedules="Wholesale"
HTML="<A HREF="OrderForm.pdf">PDF Order Form</A>"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="Express"
HTML="<A HREF="ExpressOrderForm.pdf">PDF Order Form</A>"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="Gold"
HTML="<A HREF="GoldPlanOrderForm.pdf">PDF Order Form</A>"/>
<td background="rhsbg.gif"><img height=8 src="shim.gif" width=23></td>
</tr>
<tr>
<td><img height=35 width=110 border=0 valign="bottom" src="navbottom.gif"></td>
<td width="100%" background="ftrbg.gif"><img src="ftrbg.gif" width="10" height="35"></td>
<td valign=bottom background="ftrbg.gif"><img height=35 src="rhsbottom.gif" width=23 border=0></td>
</tr>
</table>
NETQUOTEVAR:POWEREDBY</BODY>
</HTML>
<!-- BrochureOrderForms HTML end -->
cdicken
23-Apr-2003, 08:32 AM
I think you are meant to use reference numbers for the price schedules rather than the actual price schedule name. These reference numbers can be found in the 'nID' field in the 'Price Schedules' table in the ActinicCatalog.mdb database.
sandlg
23-Apr-2003, 02:31 PM
Thanks Chris...I'll give it a shot.
sandlg
26-Apr-2003, 03:34 PM
Chris...tried it but there's still nothing showing up. Here's the page for your dissection:
http://www.xodiq.com/acatalog/Orderforms.html
It looks to me like the code should work. Any suggestions?
cdicken
28-Apr-2003, 11:03 AM
This code:
<Actinic:SHOWFORPRICESCHEDULE Schedules="1" HTML="<A HREF="OrderForm.pdf">PDF Order Form</A>"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="2" HTML="<A HREF="ExpressOrderForm.pdf">PDF Order Form</A>"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="3" HTML="<A HREF="GoldPlanOrderForm.pdf">PDF Order Form</A>"/>
...looks fundamentally OK.
I think the problem could be that it is outside of a <td> tag so will not be visible to customers. i.e it is between a </td> and a <td>
sandlg
28-Apr-2003, 11:34 PM
Chris...don't know why that would make a difference but I tried it anyways. Still nothing. If I view the source it all looks fine, but I'm not getting anything on screen. Any other ideas? If you want to see the exact page, it is at http://www.xodiq.com/acatalog/Orderforms.html
cdicken
30-Apr-2003, 08:11 AM
Can I make another suggestion?
Have three products on your front page that are only visible within the correct price schedules. If you untick 'can be ordered online' then you won't get cart buttons and you can include the links to the PDFs either as embedded HTML or by using he 'Information Text Link' field.
sandlg
30-Apr-2003, 02:30 PM
I thought of that, but this would work better for me. I also need to use this on the order pages so that customers get specific messages when they are in checkout so the other method won't work there. Why is this not working?
sandlg
01-May-2003, 06:17 AM
I really need to get this working. Has anyone been able to get this to work successfully? Any ideas why it wouldn't work? If anyone has any experience with this or any suggestions, I'd really appreciate your help. My client is adament about getting this working.
cdicken
01-May-2003, 03:54 PM
I have just tried this and it worked perfectly.
Copy and paste the following code into the template for the front page of your store - Act_CatalogBody.html - just above where it says NETQUOTEVAR:PRODUCTBODY.
<Actinic:SHOWFORPRICESCHEDULE Schedules="1" HTML="&#60;A HREF=&#34;OrderForm.pdf&#34;&#62;PDF Order Form&#60;&#47;A&#62;"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="2" HTML="&#60;A HREF=&#34;ExpressOrderForm.pdf&#34;&#62;PDF Order Form&#60;&#47;A&#62;"/>
<Actinic:SHOWFORPRICESCHEDULE Schedules="3" HTML="&#60;A HREF=&#34;GoldPlanOrderForm.pdf&#34;&#62;PDF Order Form&#60;&#47;A&#62;"/>
I tested it by creating a test customer account and joined it to the 'Retail' price schedule. I then uploaded, logged in and I saw a link on the front page of the store to 'OrderForm.pdf'. I then changed my customer account to be part of the price schedule with an ID of '2' (check the database for this) and the uploaded and logged in and I just saw a link for ExpressOrderForm.pdf. And so on for the third one.
I have attached my edited template to this message.
sandlg
01-May-2003, 04:28 PM
Chris...does it have to be inside the store portion? The reason that I ask is that my client would like to be able to have the forms in a separate area. Also, they would like different text appearing at checkout. If it has to be within the catalog, maybe this won't work.
sandlg
02-May-2003, 05:34 AM
Chris...sorry to be such a pest about this...I've almost got it working but I still need a little more help.
Placing it where you suggested puts the link where it's not "cosmetically" correct. I tried moving the code but it doesn't like that. What I ended up doing was coding it in one of the fragments so it appears in the body of the one page that I need it on right now. It now shows up and changes to the correct form when I'm logged in.
Two problems remaining: the first is that nothing shows up unless I'm logged in. I have a link to a form that should show up with price schedule 1 (the normal retail schedule) but nothing shows up. As soon as I log in, it works fine.
The other problem I have is that when I log in, although the link shows up, the code is changed slightly and it can't find the form. You can test it here: http://www.xodiq.com/acatalog/Orderforms.html. To test the two other price schedules, you can log on as
Username: test
Password: test
or
Username: express
Password: express
If you could help me resolve these last two issues I'd be most appreciative. Thanks again Chris.
Steve
sandlg
02-May-2003, 08:07 AM
OK...more on this Chris. It didn't seem to like the fact that I was using .pdf files. As soon as I changed the code to point to an .html file, everything worked. What I've done is coded an html page that simply calls the .pdf file.
The problem with a user that is not logged in (the regular retail user) still exists. No link shows up unless a user logs in even though it should link to price schedule 1. I still need help on that one.
Next question for you. Is there an easy way to get the link to be a popup? I've tried coding in some javascript, but as soon as I do that, the link disappears again.
I'm confused!
cdicken
02-May-2003, 11:34 AM
The problem with a user that is not logged in (the regular retail user) still exists. No link shows up unless a user logs in even though it should link to price schedule 1. I still need help on that one.
Correct. It will only appear to logged in customers who are joined to the retail price schedule.
Check this knowledge base article for the solution you need:
http://www.actinic.com/knowledge/acatalog/Knowledge_Base_Customer_Accounts_and_Prices_133.html#aGC135
Next question for you. Is there an easy way to get the link to be a popup? I've tried coding in some javascript, but as soon as I do that, the link disappears again.
Something like this will do it:
<Actinic:SHOWFORPRICESCHEDULE Schedules="1" HTML="&#60;A HREF=javascript:ShowPopUp('URL')&#62;PDF Order Form&#60;&#47;A&#62;"/>
But 'URL' would need to be a fully-qualified URL (all encoded like the others)
And 'javascript' should be all one word.
sandlg
07-May-2003, 07:38 AM
Chris...when I use that code, this is what I get as the Actinic generated source:
<A HREF=http://www.gen-dia.com/secure/cgi-bin/bb000333.pl?ACTINIC_REFERRER=http://www.gen-dia.com/secure/cgi-bin/bb000333.pl&PRODUCTPAGE=java script:ShowPopUp('ExpressOrder.html')>PDF Order Form</A>
Obviously, it doesn't work and I get the error message "Error: Error opening /home/gendia/acatalog/java (No such file or directory)"
How can I get around the referrer?
cdicken
07-May-2003, 07:41 AM
Note my comment above:
And 'javascript' should be all one word.
The forum split the word into two for some very strange reason.
sandlg
07-May-2003, 07:51 AM
Chris...sorry, it's late at night here (or is it early morning?). If I make javascript one word, which I had done before the wee hours, then nothing shows on screen. The "PDF Order Form" text completely disappears when I try to make it a pop up. Any further suggestions?
sandlg
07-May-2003, 08:23 AM
Chris...got it working so that I do get a popup using some trickery. It doesn't like the .pdf file so I created an html file that simply calls the .pdf file and opens it into a javascript popup.
Here's my final question for you on this. How to I replace the text "PDF Order Form" with an image? I've tried a couple of things and can't seem to get it. Every time I alter the code, the link disappears. Please let me know if you can resolve this final issue on this topic. Thanks.
Here's my existing code:
<Actinic:SHOWFORPRICESCHEDULE Schedules="2" HTML="<A HREF=javascript:ShowPopUp('http://www.gen-dia.com/acatalog/ExpressOrder.html',700,500)>PDF Order Form</A>"/>
cdicken
08-May-2003, 07:43 AM
Just replace
PDF Order Form
with
&#60;img src=image.gif border=0&#62;
sandlg
08-May-2003, 02:41 PM
Thanks Chris...I must have included the quotes before. In any event, it's working exactly the way my client wants. Thank you so much for all your help on this.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.