drnklov Posted October 6, 2006 Posted October 6, 2006 In the process of setting up an OSC site () and am running into a problem that I can't seem to find a resolution to. Hope someone can shed some light on this or point me in the right direction. Customers can successfully add items to the shopping card, however if they select the [TOP] link on the breadcrumb trail they are returned to the index page with an empty cart and the SID changes when they continue. class="BreadCrumbBackground"><font size="1" face="Arial, Helvetica, sans-serif"> <a href="http:/www.sproutgrams.com" class="headerNavigation">Top</a> » <a href="http://www.sproutgrams.com/index.php?osCsid=408e0b75c087f03beda86d63" class="headerNavigation">Catalog</a></font></td> Any thoughts would be appreciated. Cheers!
GemRock Posted October 6, 2006 Posted October 6, 2006 You could either delete the Top link, by, say, change settings in the configure.php file, or install your osc shop at the domain root, rather than under www.yourdomain.com/catalog. The top link currently on your site is out of 'scope'. Ken In the process of setting up an OSC site (<a href="http://www.sproutgrams.com" target="_blank"></a>) and am running into a problem that I can't seem to find a resolution to. Hope someone can shed some light on this or point me in the right direction. Customers can successfully add items to the shopping card, however if they select the [TOP] link on the breadcrumb trail they are returned to the index page with an empty cart and the SID changes when they continue. class="BreadCrumbBackground"><font size="1" face="Arial, Helvetica, sans-serif"> <a href="http:/www.sproutgrams.com" class="headerNavigation">Top</a> » <a href="http://www.sproutgrams.com/index.php?osCsid=408e0b75c087f03beda86d63" class="headerNavigation">Catalog</a></font></td> Any thoughts would be appreciated. Cheers! commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
drnklov Posted October 6, 2006 Author Posted October 6, 2006 You could either delete the Top link, by, say, change settings in the configure.php file, or install your osc shop at the domain root, rather than under www.yourdomain.com/catalog. The top link currently on your site is out of 'scope'. Ken Ken - Appreciate the response, will likely delete the top link since the site is currently installed at the root. Anyone else seen this behavior?
GemRock Posted October 7, 2006 Posted October 7, 2006 Ken - Appreciate the response, will likely delete the top link since the site is currently installed at the root. Anyone else seen this behavior? In case others may also want to solve this issue, here's one solution: (Backup the files before making chnages!) 1. open the file application_top.php for edit (under 'catalog/include' folder); 2. locate this line of code: $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); 3. change it to (comment it out): // $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); This way, the Top link would no longer show. 4. (optional) open english.php for edit (under 'catalog/includes/languages/' folder); locate this line of code: define('HEADER_TITLE_CATALOG', 'catalog'); 5. change the 'Catalog' to 'Home' or whatever word you'd like to show on your page. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
241 Posted October 7, 2006 Posted October 7, 2006 what do you have for the defines for cookie domain and cookie path in the includes/configure.php No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
drnklov Posted October 7, 2006 Author Posted October 7, 2006 what do you have for the defines for cookie domain and cookie path in the includes/configure.php This is what I have for the defines: define('HTTP_COOKIE_DOMAIN', 'http://www.sproutgrams.com'); define('HTTPS_COOKIE_DOMAIN', 'https://www.sproutgrams.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); Thanks.
GemRock Posted October 7, 2006 Posted October 7, 2006 This problem is due to the fact that, in a default setup, the Top link is simply a http link to the domain root (depending on the setting in configure.php), whereas any other 'breadcrumb' links are returned by the tep_href_link function, which would have the sid attached so that the contents in the shopping cart would not disappear when a user clicks those 'breadcrumbs'. You could change: $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); to: $breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT)); The 'empty cart' problem would disappear and you also save the Top link. But then why you want to have two duplicate links (Top & Catalog)? Further more, if you set 'Force cookie use' to true, then there would not be any 'empty cart' problem since there's no need to use sid, and you do not need to make any change. The existence of the Top link would cause this irritating empty cart problem, hence my suggestion to get rid of it unless you have a special use of it on your site. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
drnklov Posted October 8, 2006 Author Posted October 8, 2006 This problem is due to the fact that, in a default setup, the Top link is simply a http link to the domain root (depending on the setting in configure.php), whereas any other 'breadcrumb' links are returned by the tep_href_link function, which would have the sid attached so that the contents in the shopping cart would not disappear when a user clicks those 'breadcrumbs'. You could change: $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); to: $breadcrumb->add(HEADER_TITLE_TOP, tep_href_link(FILENAME_DEFAULT)); The 'empty cart' problem would disappear and you also save the Top link. But then why you want to have two duplicate links (Top & Catalog)? Further more, if you set 'Force cookie use' to true, then there would not be any 'empty cart' problem since there's no need to use sid, and you do not need to make any change. The existence of the Top link would cause this irritating empty cart problem, hence my suggestion to get rid of it unless you have a special use of it on your site. Ken Ken - Agree with your point. Top link is out and will rename catalog to Home. Many thanks.
JHouse Posted December 4, 2006 Posted December 4, 2006 Thank you all...this thread helped me, and consequently my client, and consequently his clients, immensly. We all win. Thanks again for all the help here. JHouse
jamescells Posted December 4, 2006 Posted December 4, 2006 Hi Guys. I have the same problem, except in a different way. I have created my own custom dropdown menu which doesnt pull the links off the database but instead i have hardcoded in the links like this : <a href="<?=tep_href_link('index.php?cPath=22_54_83')?> As soon as the new page loads i have an empty cart and a new SID. any ideas on how i can fix this. I really like my dropdown menu! :'( Please if anyone has a solution please help me!! :blush:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.