Jump to content

Resolved - Append Condition Code to Product Name


mitchellds

Recommended Posts

V: CubeCart 5.1.4, clean

I'm interested in appending the condition code to the product name on my site at XebraParts.com. I do realize that when you click on a specific product, the condition code is listed. I'm looking to make this improvement 'one level up' in the product catalog.

For example: for each product, I need to display the product name plus the condition code in parenthesis.

I have attached a screen shot of the way I am interested in making the improvement...unless someone out there has a much more simple, better idea that will allow me to accomplish the same goal.

Link to comment
Share on other sites

I have found that, generally, CC5 gives to Smarty the entire record's contents for each inventory record. What that means is, in the template, simply try adding the array.column and see what pops up.

In the file /skins/YOUR_SKIN/templates/content.category.php, find:


{if isset($PRODUCTS)}

  {foreach from=$PRODUCTS item=product}

<form action="{$VAL_SELF}" method="post" enctype="application/x-www-form-urlencoded" class="addForm">

  <div class="category_product">

    <h3><a href="{$product.url}" title="{$product.name}">{$product.name}</a></h3>





Make the end of the last statement look like this:


...{$product.name}</a> <span style="color:red;">({$product.condition})</span></h3>

On the off-chance that CC5 somehow did not get the `condition` column from the table, it would be real easy to add it to the query.

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.

Guest
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...