| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to show "New Arrival!" Icon | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to show "New Arrival!" Icon
Hi everyone.
I would like to show a little "New Arrival!" graphic icon or text next to the product name in product list and product's detail page. And I want this icon to show up with products which were added recently(i.e. lastweek, in last 21days, et cetra...). Could anyone tell me how to do this? |
|||||||
#2
|
|||||||
|
|||||||
I have been using the following code for over a year. The source below is from my current store version 3.54.
You only need to change one file and add a small graphic image to display the "New" status on items that were added in the last "so many days". I added the image right after where the item title is displayed. I'm sure you can move it anywhere you would like. My image size is 31x12. The following code will show the "New" icon if the item was added 20 days or less ago. 1. Add your graphic file in folder "skin1/images". I named my graphic file "skin1/images/mynew.gif". Shown below is the icon I use. http://www.CabdCollectibles.com/store/skin1/images/mynew.gif 2. The file "skin1/customer/main/products.tpl" was changed to add the following code. Just insert the following code after line 12: Code:
>>>>>>>>>> Listed below is the code that is before the above code just for a quick reference point of where to insert the additional code. Hope it works.... Code:
|
|||||||
#3
|
|||||||
|
|||||||
thanks!
Sorry for replying late. Didn't notice my post was moved to other section...
Anyway, the code you gave me works totally fine! Thanks. |
|||||||
#4
|
|||||||
|
|||||||
I have just implemented this addition to my site. It is really useful for highlighting new items.
Thanks for the code. |
|||||||
#5
|
|||||||
|
|||||||
I can't seem to get it to work. Here is the code, it should be ok.:
{* $Id: products.tpl,v 1.33.2.2 2003/08/26 06:06:22 svowl Exp $ *} {if $usertype eq "C" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")} {include file="customer/main/products_t.tpl" products=$products} {else} {if $products} {section name=product loop=$products} <table border=0 width=100%> <tr><td width=90 align=center valign=top> <a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{in clude file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {$lng.lbl_see_details}</a> </td> <td valign=top> {$products[product].product}</font> {* // 60 * 60 * 24 * 20 days in unix time = 1728000б═ *} {if ($products[product].add_date gt $smarty.now - 1728000) and ($products[product].add_date lt $smarty.now)} [img]{$ImagesDir}/newstar.gif[/img] {/if} <font size=1> {$products[product].descr|truncate:300:"...":true} </font> <hr size=1 noshade width=230 align=left> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].price ne 0} {if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].price lprice=$products[product].list_price format="%d" assign=discount} <font class=MarketPrice>{$lng.lbl_market_price}: <s> {include file="currency.tpl" value=$products[product].list_price} </s></font> {/if} <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].list_price gt 0 and $products[product].price lt $products[product].list_price}, save {$discount}%{/if}{if $config.Taxes.use_vat eq "Y" and $products[product].vat gt "0"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if} {else} <font class=ProductPrice>{$lng.lbl_enter_your_price}</font> {/if} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} </td></tr> </table> {/section} {else} {$lng.lbl_no_products_found} {/if} {/if}
__________________
X-Cart version 4.0.7 |
|||||||
#6
|
|||||||
|
|||||||
this is great, thanks!
__________________
----------------------- x-cart v4.7.6 [LIVE] x-cart v4.0.18 [retired 2004-2016] x-cart v3.5.13 [retired] x-cart v3.4.14 [retired] |
|||||||
#7
|
|||||||
|
|||||||
is there a solution for xcart 4 users, this could be quite a handy mod to have if it works
cheers
__________________
xcart version 4.1.6 UK - Brighton QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more. |
|||||||
#8
|
|||||||
|
|||||||
Works in 4.0.9
Quote:
I am using the same configuration as stated above and it works fime for me. I am now at 4.0.9
__________________
X-Cart version 4.0.14 Sales-n-Stats 1.1 build 36 PHP 5.0.5 MySQL server 4.1.22-Standard Perl 5.008 |
|||||||
#9
|
|||||||
|
|||||||
Re: Works in 4.0.9
Quote:
excellent, will give it a whirl.....didnt work first time, but maybe missed something
__________________
xcart version 4.1.6 UK - Brighton QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more. |
|||||||
#10
|
|||||||||
|
|||||||||
I copy and paste the code in the location it was suggested and It did not work for me.
any ideas? Kind regards, Ricky
__________________
X-CART Gold version 4.0.14 & 4.1.11 Apache Version 1.3.29 (Unix) EWDHosting-Quality X-cart Hosting We will always sell you the right shoe and the left one is free. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|