Jump to content

What are the 'smarty' tag names for UPC, EAN, etc.


Recommended Posts

skins/mican/templates/content.checkout.php has lines

{foreach from=$item.options item=option}
      <strong>{$option.option_name}</strong>: {$option.value_name|truncate:45:"&hellip;":true}
     {if !empty($option.price_display)} ({$option.price_display}){/if}

How would I add in, for example, the UPC, EAN code, etc.?

I imagine it's something like


but can't think of anything to make it work and there doesn't seem to be any documentation.

Any ideas?

Many thanks.


Link to comment
Share on other sites



In (CC525) Catalogue->getProductData (near line 454), there is a section that will fetch most data from the CC_option_matrix database table if there is an options_identifier. The data fetched is:

'stock_level' ,'product_code', 'upc', 'jan', 'isbn', 'image'

but not 'ean', nor are there columns for 'gtin' and 'mpn' like what is available in the CC_inventory table.


The keys/values of these columns are put in place of the related keys/values from the CC_inventory table. So, for each item in the shopping cart (a unique combination of chosen options makes a unique item), there will be the respective keys in the $item array.

$item.stock_level, $item.product_code, $item.upc, $item.jan, $item.isbn, $item.image


But these are valid only if there is a value to be had. For example, if 'jan' is null in the database, then $item.jan will be empty. So it's best to test {if !empty($item.jan)}{$item.jan}{/if}

Link to comment
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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Create New...