Show item in cart


english 88618

Show item in cart

With this code sequence you can place the display anywhere that this item has already been placed in the shopping cart.

Find in product_info.php

      if (tep_not_null($product_info['products_model'])) {
          $products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>';
      } else {
          $products_name = $product_info['products_name'];
      }

Add after it:

// Item in cart bof
$products = $cart->get_products();
$in_cart = '';
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$first = current(explode("{", $products[$i]['id']));
if ($first == $product_info_ajx['products_id']) {
$in_cart = '<i class="fa fa-cart-plus"></i>&nbsp;';
}}
// Item in cart eof

Find:

<h1><?php echo $products_name; ?></h1>

Change to:

<h1><?php echo $in_cart . ' ' . $products_name; ?></h1>

Average overall rating
 off 2 Reviews
Awarded 2 x 5  Stars
Why your email address?
If necessary, I will contact you to help you with the implementation.
Your email address will not be made public.
Is this post helpful to you?
Please enter the verification code!
Please enter the verification code!
Information(1)
General information
 Free advertising
Post counter
Current information status:
Categories: 9
Posts: 104
Support pages: 57
Downloads for members: 104
Download counter: 646
Reviews total79
Companies: 34
Support: 38
Information: 7