Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

Terry Paulhus
Ecommerce Template Expert

Canada
573 Posts

Posted - 01/29/2022 :  11:33:25  
I have been working on a javascript counter for the cart to adhere to my menu. Everything seems to be working however I have run into a snag.

I can go through my menus and click to add product. The counter works.
I then go into the cart and the counter still works.
From there I go back into the menu and add more product. Counter works.
**
Then I go back into the cart and the cart totals are wrong. I have to refresh to get it to show up as accurate.

I would appreciate any help here

Terry (Redsei)

DLSS
ECT Moderator

Canada
3958 Posts

Posted - 01/30/2022 :  09:36:05  
I can replicate your issue here. I am going to suggest this is due to caching of the page, as if you refresh the page or hit F4 the counter and products update fine.

Add these php lines to your cart.php header before the HTML tag and see if they eliminate this issue.

header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.

Mike Beebe
President,
DataLinks Software Solutions
www.dlss.ca

Rate Me Here

ASP and PHP mods - www.dlss.ca/products.asp
A Tremendous Home - www.ATremendousHome.com
Buy Cigars Online www.CigarSmokeShop.net

Terry Paulhus
Ecommerce Template Expert

Canada
573 Posts

Posted - 01/30/2022 :  11:05:01  
Thanks for the help Mike but no go.

I have this at the top of every page currently.

quote:
<!DOCTYPE html>
<?php
session_cache_limiter('none');
session_start();
ob_start();
include "vsadmin/db_conn_open.php";
include "vsadmin/inc/languagefile.php";
include "vsadmin/includes.php";
include "vsadmin/inc/incfunctions.php";
include "vsadmin/inc/metainfo.php";
include "vsadmin/inc/incectstyle.php";?>

<?php
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies
?>


When I go into the cart and then click on "checkout", then I exit by way of menu into another product, the number disappears.
Then clicking on items, the numbers starts t "0" and continues on until I get back into the cart which updates to the REAL number.

Am I supposed to have this on every page, or just the details page where the BUY button is? I also have it in the cart page as well.

Terry (Redsei)

Terry Paulhus
Ecommerce Template Expert

Canada
573 Posts

Posted - 02/02/2022 :  08:52:09  
Any more help on this topic?

Terry (Redsei)
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000