AbanteCart Community

Shopping Cart Operations => Support => Template Support => Topic started by: Ollie on September 22, 2014, 06:58:44 AM

Title: Displaying Related Items on Shopping Cart Page
Post by: Ollie on September 22, 2014, 06:58:44 AM
I'd like to display the related items (if any) on the Shopping Cart page. How can this be accomplished? I tried inserting this code where I want the items displayed, but it didn't work.

<?php if ($related_products) { ?><li><a href="#relatedproducts"><?php echo $tab_related; ?> (<?php echo count($related_products); ?>)</a></li><?php } ?>
Title: Re: Displaying Related Items on Shopping Cart Page
Post by: yonghan on September 22, 2014, 08:04:41 AM
Hello,as abantecart was mvc based framework,so you need to check the controller file before you paste the code on tpl page.if the data was not passed from the related controller file,the in the template file will not show anything as there are no data.hope it helps.
Title: Re: Displaying Related Items on Shopping Cart Page
Post by: Ollie on October 24, 2014, 01:28:22 AM
you need to check the controller file before you paste the code on tpl page
What do I need to look for in the controller file? Do I need to add anything?