Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

how to update cart just before Checkout_Confirmation?


Recommended Posts

Hi guys,


I am in need of some help. I have combined the DiscountCode with the Free Gift (Dangling Carrot). Both work perfect seperately, but I need to check one against the other and I am almost there.

discount code: Discount Code

Gift: Dangling Carrot


Basically, on the discountcode enter page (Payment_confirmation), I check against 1 particular code (I have only 1 client with free gifts AND discount). Then, if I go to the CheckOut_Confirmation page, it succesfully adds the free gifts to the cart, it shows the correct quantity in the header (extra gifts) and it shows the correct price.

But, I don't see the shipping-weight and shipping-costs updated. The items are correctly updated, but the weight is not being checked at the point apparantly.

Is there no simple function to update weight and shipping, without going back to previous pages?



Link to comment
Share on other sites

Nobody can help me?


I managed to add a 'code field' to the customer account creation, and then copying that code to the free gift setup at login with:


$account_query = tep_db_query("select customers_discode from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

$account = tep_db_fetch_array($account_query);

if (!$sess_discount_code) $sess_discount_code = $account['customers_discode'];


That works, if a customer logs in BEFORE adding product to the cart. BUT, if he adds products to the cart and then logs in or creates a new account, I am stuck with the same problem as the first post; the items are correctly added, but the shipping weight and costs are not recalculated. So, I would still like to know if there is a simple function to update weight and shipping, without going back to previous pages?

Link to comment
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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...