Hi, I'm adding a block for newest products with the appearance type: Short List. The short list shows:
Product Picture
Product Name
Product Code
Product Price
This is how it looks now:
I need to change the Product Code for the Saving percentage instead. There are other appearance types that include the savings if you need to find the function:
multi column small
product
product 2…
I would like to set it so instead of showing the code, it would show “10% OFF” in red like this.
First one that come up with the way to get it done as shown in the image get $35 in their Paypal. I'm not really good at it so I will need details and please test it before posting.
If need more details please PM.
Thank you for your help,
D.
Offer at $45. Come on, if you need more money just say so, I need this fix asap.
D.
[quote name='Belzibot' timestamp='1317959375' post='123100']
Offer at $45. Come on, if you need more money just say so, I need this fix asap.
D.
[/quote]
The job is done.
D.
tom437
October 19, 2011, 12:00am
#4
[quote name=‘Belzibot’ timestamp=‘1317986813’ post=‘123119’]
The job is done.
D.
[/quote]
Hey,
Can you post it for the rest of us, PLEASE
[quote name=‘tom437’ timestamp=‘1319041464’ post=‘124053’]
Hey,
Can you post it for the rest of us, PLEASE
[/quote]
Sorry for the delay Tom, please PM me and I’ll send you the files and details.
D.
[quote name=‘tom437’ timestamp=‘1319041464’ post=‘124053’]
Hey,
Can you post it for the rest of us, PLEASE
[/quote]
Hi, just replace the code below in skins\basic\customer\blocks\list_templates\compact_list.tpl
Here are the codes: I think there is only 1 line that is changed; compare it with yours.
{* $Id: compact_list.tpl 11903 2011-02-24 09:18:16Z aelita $ *}<br />
<br />
{if $products}<br />
<br />
{script src="js/exceptions.js"}<br />
<br />
{if !$no_pagination}<br />
{include file="common_templates/pagination.tpl"}<br />
{/if}<br />
{if !$no_sorting}<br />
{include file="views/products/components/sorting.tpl"}<br />
{/if}<br />
<br />
<form {if $settings.DHTML.ajax_add_to_cart == "Y"}class="cm-ajax"{/if} action="{""|fn_url}" method="post" name="short_list_form{$obj_prefix}"><br />
<input type="hidden" name="result_ids" value="cart_status,wish_list" /><br />
<br />
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="table"><br />
<tr><br />
<th> </th><br />
<th>{$lang.product}</th><br />
<th>{$lang.saving}</th><br />
{*<th>{$lang.product_code}</th>*}<br />
<th>{$lang.price}</th><br />
{if $show_add_to_cart}<th> </th>{/if}<br />
</tr><br />
<br />
{foreach from=$products item="product" key="key" name="products"}<br />
{assign var="obj_id" value=$product.product_id}<br />
{assign var="obj_id_prefix" value="`$obj_prefix``$product.product_id`"}<br />
{include file="common_templates/product_data.tpl" product=$product}<br />
{hook name="products:product_compact_list"}<br />
<tr {cycle values=",class=\"table-row\""} valign="middle"><br />
<td class="product-image"><br />
<a href="{"products.view?product_id=`$product.product_id`"|fn_url}">{include file="common_templates/image.tpl" image_width="40" image_height="40" images=$product.main_pair object_type="product" obj_id=$obj_id_prefix show_thumbnail="Y"}</a><br />
</td><br />
<td class="compact"><br />
{assign var="name" value="name_$obj_id"}{$smarty.capture.$name}<br />
</td><br />
<td class="center"><br />
{if $product.discount || $product.list_discount_prc}<br />
<div class="discount-label cm-reload-{$obj_prefix}{$product.product_id}" id="discount_label_update_{$obj_prefix}{$product.product_id}"><br />
<div id="line_prc_discount_value_{$obj_prefix}{$product.product_id}"><br />
<em><strong>-</strong><span id="prc_discount_value_label_{$obj_prefix}{$obj_id}">{if $product.discount}{$product.discount_prc}{else}{$product.list_discount_prc}{/if}</span>%</em><br />
</div><br />
</div><br />
{else} {/if}<br />
</td><br />
{*<br />
<td class="center"><br />
{assign var="sku" value="sku_$obj_id"}{$smarty.capture.$sku}<br />
</td>*}<br />
<td class="center"><br />
{assign var="price" value="price_`$obj_id`"}{$smarty.capture.$price}<br />
</td><br />
{if $show_add_to_cart}<br />
<td class="center nowrap"><br />
{assign var="add_to_cart" value="add_to_cart_`$obj_id`"}{$smarty.capture.$add_to_cart}<br />
</td><br />
{/if}<br />
</tr><br />
{/hook}<br />
{/foreach}<br />
</table><br />
<br />
</form><br />
{if !$no_pagination}<br />
{include file="common_templates/pagination.tpl"}<br />
{/if}<br />
<br />
{/if}
```<br />
<br />
The word "saving" can be managed in admin, just add one new language variable called "saving" otherwise it will not look right.<br />
<br />
These codes will not actually show the discount at 12% OFF but will show in the discount red tag. I think it look better like that.<br />
<br />
If you need any modifications you might want to consider cscartrocks.com, Louis is a great guy to work with, reliable and affordable.<br />
<br />
Please share your modifications. Maybe admin should set a section to share modifications.<br />
<br />
Enjoy.<br />
<br />
D.