PDA

View Full Version : Coupon in cart error - clues?


mj2003
07-Jul-2004, 02:47 PM
Hi, I checked the option to have the coupon entry in the cart, but it causes the coding to appear in the page (NETQUOTEVAR stuff). I can't find where to edit this as the cart page doesn't appear in the preview list of pages.

Could someone point me at the file that must be wrong please? If I could find it I can probably see the error. Thanks.

You can see how it appears at www.banxia.com/files/couponerror.jpg - see the bottom left.

Krithika
08-Jul-2004, 11:26 AM
Hi Matthew

It seems like changes might have been made to the Act_ShoppingCart.html and/or the Act_Order01.html file(s).

Go to Advanced | Template Manager. If you are not seeing the buttons, click on Change View. Select the Ordering tab and then click on 'Cart'. This will open Act_ShoppingCart.html.

The typical codes pertaining to coupons in this file should be :
==========================================================

NETQUOTEDEL:CAPTURECOUPON
<!-- coupon entry begins -->
<br>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td><strong>NETQUOTEVAR:COUPONTITLE</strong>&nbsp;NETQUOTEVAR:COUPONMESSAGE</td>
<td valign="top">
<input type="TEXT" name="COUPONCODE" size="15" maxlength="255" value="NETQUOTEVAR:COUPONCAPTION" onFocus="this.value='';this.style.background='#FFFFFF'">
</td>
</tr>
</table>
<!-- coupon entry ends -->
NETQUOTEDEL:CAPTURECOUPON

==========================================================
Similarily click on the Order Phase 01 button to open Act_Order01.html.
The typical codes should be :

==========================================================

<!-- Coupon entry code begin -->
NETQUOTEDEL:CAPTURECOUPON
<span class="actregular"><b>NETQUOTEVAR:COUPONTITLE</b></span><br><br>
NETQUOTEVAR:COUPONMESSAGE
<table border="0" width="CUSTOMVAR:ACTSTDWIDTH" cellspacing="2" cellpadding="2">
<tr>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">NETQUOTEVAR:COUPONCAPTION</td>
<td bgcolor="NETQUOTEVAR:CHECKOUTBG">
<input type="TEXT" name="COUPONCODE" size="20" maxlength="255" value="NETQUOTEVAR:COUPONCODE">
</td>
</tr>
</table>
<p>
<hr size="1" align="CENTER" width="CUSTOMVAR:ACTSTDWIDTH">
NETQUOTEDEL:CAPTURECOUPON
<!-- Coupon entry code end -->

==========================================================
Hope this helps.

Cheers

mj2003
08-Jul-2004, 12:21 PM
Thanks for that. It seems that my file has the right content, but isn't showing. What I have done is put some markers (<MJMARK1/> etc ) in the cart html to see what is happening. It appears that the coupon code in that page is correct (indeed it is there at the bottom right now I look!).

What is happening is that there is another one coming in from Act_Primary.html. And indeed commenting it out makes it work. I also seem to have another in Act_PrimaryLeft.html. Is that going to be okay there?

I'm a little confused. Indeed, turning on the "coupon in store pages" option makes no change. Have I lost that facility by this?

The code in Act_Primary is:

NETQUOTEDEL:CAPTURECOUPON
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<form method="NETQUOTEVAR:CGIMETHOD" action="NETQUOTEVAR:CGIURL">
<tr>
<td colspan="2" valign="top"><strong>NETQUOTEVAR:COUPONTITLE</strong></td>
</tr>
<tr>
<td colspan="2" valign="top">NETQUOTEVAR:COUPONMESSAGE </td>
</tr>
<tr>
<td valign="top"><input type="TEXT" name="COUPONCODE" size="15" maxlength="255" value="NETQUOTEVAR:COUPONCAPTION" onFocus="this.value='';this.style.background='#FFFFFF'"></td>
<td><input type="SUBMIT" name="ACTION" value="NETQUOTEVAR:COUPONACTION"></td>
</tr>
</form>
</table>
NETQUOTEDEL:CAPTURECOUPON

Thanks for all your help.

Krithika
08-Jul-2004, 01:39 PM
Hi

The coding in your Act_Primary seems OK as compared to the original.

Can you clarify :

commenting it out makes it work.

In which file have you commented out the codes and what are the codes you have commented?

Cheers

mj2003
08-Jul-2004, 01:59 PM
I commented out the coupon code in Act_Primary.html, and the "incorrect" coupon part worked. The correct one is still live in the shopping cart. It therefore seems that the two files were trying to put a coupon code in. But it also seems that commenting it out there stops the coupon-in-product-pages feature from working.

I'm trying to remember which theme I based the new site on - but you can probably recognise it! Hmm - Curves seems to fit. I'm surprised it doesn't happen to everyone given that having two coupon sections must be a bit odd. Which file is is that controls the coupon in the product pages?

mj2003
08-Jul-2004, 02:08 PM
And a quick check, re-enabling the Act_Primary coupon code and checking the "in product pages" option shows the coupon there too.

Can Actinic please confirm that enabling all three options on a test site does indeed show only one coupon item in the cart? It doesn't show in the preview because there is no cart preview. I don't have a test site to play with at the moment, though I could set it up in test mode with no HTML stripping if you want?

Krithika
09-Jul-2004, 09:26 AM
Hi

For the Curves theme, you need to change the template for the 'View Cart Layout' (In Design | Options, Layout tab). In the drop-down list for this field, select "Primary Template for View Cart page" (Act_PrimaryCart.html).

Try this and this should solve the problem.

Cheers

mj2003
09-Jul-2004, 09:38 AM
Thanks - that does indeed fix it. Can you explain why? What is the default one, and how does this differ.

Thanks!

Krithika
09-Jul-2004, 10:10 AM
Hi

Great !!!!

This template does not include the coupon code in the sidebar. If you upgrade to V7 from a previous version, this is not selected by default.

Cheers

Laylah
09-Jul-2004, 09:17 PM
Using Actinic-Business . . .

We have the same problem . . . using 'business theme'. "Primary Template for View Cart page" is not one of the options and Act_PrimaryCart.html is not in the site1 directory.

Any suggestions welcome

cdicken
12-Jul-2004, 09:07 AM
Hmmmm....

I don't think you can be having exactly the same problem, because in Curves, the coupon field appears in the sidebar but in Business it appears underneath the navigation bar.

Could you check your Act_Primary.html template and check that the code for the coupons starts with NETQUOTEDEL:CAPTURECOUPON and also ends with NETQUOTEDEL:CAPTURECOUPON. These are the tags that ensure that the code will only appear where it is meant to.

Laylah
12-Jul-2004, 10:59 AM
Hmmm . . . seems to be the right reply here.

I just reset to display the coupon in the cart and now it works fine. I reckon you scared the error off!

Thanks