is there anyway to add related products after the add to cart button, instead of just showing it in the side navigation?
is there anyway to add related products after the add to cart button, instead of just showing it in the side navigation?
By default, if you do not assign the Related Products nav block to your theme, related products appear below the product on it's detail page.
Showing them after an item is added to the cart would require some custom code.
Thanks,
Jamie
PHP shopping cart software - Squirrelcart
Please rate or review us!![]()
Hotscripts ● PHP Resource Index
jamie,
I think that is what I want, but I can't seem to get it to show unless I enable the Nav Block, I'm not sure if I am missing a setting somewhere but in visual settings it does say to show 3, same thing with also ordered but I am not seeing anything anywhere.
Not sure if I am having a dumb moment or what.
Ah, OK. You are probably using a custom version of the product_detail.tpl.php template and are missing the variable for it. Take a look towards the bottom of squirrelcart/themes/squirrelcart/product_detail.tpl.php. You should find the variable. I *think* it's:
I am not at my computer at the moment but I think that is correct. If you add that towards the bottom of your custom version of that template it should work.PHP Code:<?php print $Related_Products ?>
The docs listing all the template changes will be available early tomorrow.
Thanks,
Jamie
PHP shopping cart software - Squirrelcart
Please rate or review us!![]()
Hotscripts ● PHP Resource Index
no prob jamie, I can look at the 2 files and I'm sure i can figure it out, I totally forgot about the template files.
Thanks, Now I have to stay up later and get it all good to go.![]()
I can confirm that the code you need is:
By default, it is right after:PHP Code:<?php print $Related_Products?>
PHP Code:<?php print $Reviews?>
Thanks,
Jamie
PHP shopping cart software - Squirrelcart
Please rate or review us!![]()
Hotscripts ● PHP Resource Index
There are currently 1 users browsing this thread. (0 members and 1 guests)