Jump to content
Sign in to follow this  
Julie

Header template / Shopping with image

Recommended Posts

Hello,

 

Do you have an idea to change inside the shopping header, the product title by an image ?

 

Thank you.

Share this post


Link to post
Share on other sites
Posted (edited)

@Julie,

This code can help you, replace the product name by this :

 

<?php
  $products = $CLICSHOPPING_ShoppingCart->get_products();

  foreach ($products as $k => $v) {
    $name = $v['name'];
    $image = HTML::image($CLICSHOPPING_Template->getDirectoryTemplateImages() . $v['image'], HTML::outputProtected($name), 50, 50, null, true);

    echo '
          <div class="row">
            <div class="col-md-12">
              <li class="headerMultiTemplateDefaultLi">&nbsp;&nbsp;
                <div class="float-md-left">' . $v['quantity'] . ' - ' . $name . '</div>
                <div class="float-md-right text-md-right">' .  $CLICSHOPPING_Currencies->display_price($v['final_price'], $CLICSHOPPING_Tax->getTaxRate($v['tax_class_id']), $v['quantity']) . '</div>
              </li>
            </div>
          </div>
    ';
  }
?>

 

Edited by Patrick
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use