Jump to content
peterp

Basket not zeroing after payment

Recommended Posts

Hi All,

        I'm using the skin etrend and are using ver 6.2.5 of cubecart and I have just noticed that when an order has been completed and the user goes back to the home page then the basket is not emptied it seems to retain the value of the last order entered.

I have tried this on different skins including the foundation skin and I get the same result, must be doing something wrong where should I look for the clearing of the basket process.

If you click on the basket you can see the order just entered and if you haven't noticed that it wasn't zerosing then the new products are added.

Has anybody else had this issue and if so how do you fix it.

Any help will be appreciated.

Best Regards,

Peterp

 

Share this post


Link to post
Share on other sites

As I understand it, there could be the scenario where the customer can re-visit your store from (PayPal's page, for example), but before (PayPal, for example) sends its Immediate Payment Notification (IPN) call. When CubeCart receives the IPN, CubeCart then makes a callback to (PayPal, for example) to verify the transaction results.

If the callback to (PayPal, for example) gets a result that the transaction was successful, then CubeCart updates the transaction log and empties the customer's shopping cart.

The IPN management is supposed to happen very quickly, quicker than the time it takes the customer to return back to your store. (PayPal, for example) is supposed to send the customer to your store, but the customer can do things out of step and that causes problems.

If (if!) this is what is actually happening, I do not recall seeing a solution for this.

If your experiments involve other steps, then (in my opinion) CC625 is good enough such that upgrading to CC628 won't make any difference.

 

Share this post


Link to post
Share on other sites

Hi Brian,

I wasn't using anything like PayPal I was using the direct debit (Bank Transfer) gateway for payment. The processes seem to go through without any hiccups even to the point where the order receipt is displayed when you print or close the receipt and cubecart goes back to the home page the basket still has the amount of the order displayed. Needless to say their are no email sent by the system so I went looking at the email log thinking that this maybe causing some issues. I looked at the email templates and found that the email confirm template seems to have a syntax error in the html which it states ' HTML Content: Syntax error in template " Thank You {$DATA.first_name..."  on line 6 "' I don't know whether this is the problem or am I grasping at straws.

I have just checked the order received email template and this also has an html error could this be my problem. How do I fix this I haven't change these templates and they are stock standard.

Any help will be useful as I don't know which way to go or where to even start looking.

Best Regards.

Peterp

Share this post


Link to post
Share on other sites

This seems to be Order Confirmation and line 6 is:

<p><a href="{$DATA.link}">{$DATA.link}</a></p>

So, check on this.

Looking at the code, the POF gateway.class.php, an email is sent to the customer, immediately followed by a command to clear the cart.

Certainly, if Smarty has a fatal error at some point in the process, anything that follows may or may not happen.

Share this post


Link to post
Share on other sites

HI Brian,

I have checked the order confirmation as the best I can see is that the source code for the html is as you have indicated I have also checked the email template for order received and that has an error as well probably the same one.

The code below is some of the Order confirmation email template html source. the highlighted code is what I think you meant.

<p>Thank You {$DATA.first_name|capitalize}!</p>

<p>Tax Invoice number {$DATA.cart_order_id} has been received which was placed on {$DATA.order_date}. Please keep this email for your records. It is possible to view the status of your order online.</p>

<p><a 100="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table width="><strong>Billing address:</strong><br />
{$BILLING.first_name|capitalize} {$BILLING.last_name|capitalize}<br />
{if !empty($BILLING.company_name)}{$BILLING.company_name}<br />
{/if} {$BILLING.line1|capitalize}<br />
{if !empty($BILLING.line2)}{$BILLING.line2|capitalize}<br />
{/if} {$BILLING.town|upper}<br />
{if !empty($BILLING.state)}{$BILLING.state|upper}<br>{/if} {$BILLING.postcode}<br />
{$BILLING.country}<br />
{$BILLING.phone}<br />
<br />
<strong>Email:</strong><br />
{$BILLING.email} <strong>Shipping address:</strong><br />
{$SHIPPING.first_name|capitalize} {$SHIPPING.last_name|capitalize}<br />
{if !empty($SHIPPING.company_name)}{$SHIPPING.company_name}<br />
{/if}{$SHIPPING.line1|capitalize}<br />
{if !empty($SHIPPING.line2)}{$SHIPPING.line2|capitalize}<br />
{/if}{$SHIPPING.town|upper}<br />
{if !empty($SHIPPING.state)}{$SHIPPING.state|upper}<br>{/if} {$SHIPPING.postcode}<br />
{$SHIPPING.country} </a></p>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
    <tbody>
        <tr>
            <td><a 100="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table width="><strong>Item</strong></a></td>
            <td><a 100="" href="&lt;!--{cke_protected}%7B%24DATA.link%7D%22%3E%7B%24DATA.link%7D--&gt;&lt;/a&gt;&lt;/p&gt;
&lt;table width="><strong>Quantity</strong></a></td>

This is just some of the mail template code.

Is this what you mean.

Best Regards,

Peterp

 

 

Share this post


Link to post
Share on other sites

There is a lot wrong with this template.

Please visit /language/email_definitions.xml, near line 44. Find:
<content type="html"><![CDATA[
and copy everything after that up to but not including this near line 122 to the clipboard:
]]></content>

Open Order Confirmation by clicking on the USA or UK flag (depends on the default language of the store, but may need to do both). Switch the editor to Source mode and replace the entire contents with what you just copied to the clipboard. Save.

Re-open this template to make sure the contents didn't get messed up.

Share this post


Link to post
Share on other sites

Hi Brian,

I have made these changes and I had to also do the same for order received template and it seems to now be working and zeroises the basket. I will be doing further testing but I think everything fine.

Once again thankyou for your assistance with this issue.

Best Regards,

Peterp

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...