Jump to content

Archived

This topic is now archived and is closed to further replies.

spoot

shopping cart empties when I change categories

Recommended Posts

Hi -

 

Everything on my OS commerce site seems to be working: I can add products to the shopping cart, etc. I've still got a ways to go, but the basics seem to work.

 

Or they almost do. When I move to a different root category, my shopping cart empties out & my cart resets to 0 items. In the new category I can again fill the cart (from child categories too) - but again, when I switch root categories, everything's back to zero.

 

Any ideas why this would happen? Thanks in advance for any help -

 

Michael

Share this post


Link to post
Share on other sites

Alright, I think I know what the problem is: I don't have session ID's in my main navigation bar, which is hard-coded so I can have rollovers. Now, how do I add session IDs to my rollovers?

 

Let me know if you can, I'm going to try to find it in the forums...

Share this post


Link to post
Share on other sites

Okay, fixed. Instead of making a hard coded url, like:

 

echo '<td class="tab"><a href="http://localhost/catalog/index.php?cPath-21"><img src="images/tab'.$tab.'On.gif" border="0" alt=""/></a></td>';

 

I needed to use tep_href_link, like:

 

$cPath_new = 'cPath='.$tab;
$link = tep_href_link(FILENAME_DEFAULT, $cPath_new);
echo '<td class="tab"><a href="'.$link.'"><img src="images/tab'.$tab.'On.gif" border="0" alt=""/></a></td>';

Share this post


Link to post
Share on other sites

×