Jitty25 Posted September 10, 2010 Posted September 10, 2010 Hi, I have been searching the forum for some time, but couldn´t find a code that would display something like "you already have this item in your cart" either on product_info or in thumbnail view of all products (even better). I have this piece of code in wishlist.php and it does exactly what I need. If you have the item in your cart, it shows the sign on wishlist.php. if($cart->in_cart($wishlist_id)) { echo '<br /><font color="#FF0000"><b>' . TEXT_ITEM_IN_CART . '</b></font>'; } Could you please help me modify the code so that I could insert it in product_listing.php or in product_info.php? Thank you very much
Jitty25 Posted September 14, 2010 Author Posted September 14, 2010 Here is a possible solution :) <?php if ($_SESSION['cart']->in_cart($_GET['products_id'])) { echo '<br /><font color="#FF0000"><b>' . TEXT_ITEM_IN_CART . '</b></font>'; } ?>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.