Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to show "New Arrival!" Icon

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-30-2004, 02:43 AM
 
Mary Jo Robins Mary Jo Robins is offline
 

Advanced Member
  
Join Date: Aug 2003
Location: Virginia Beach, VA 23462
Posts: 87
 

Default

Here is a copy of my products.tpl
The only change I made to the orginal code posted for this mod was to hard code my path to the 'NEW" img file because it is not within my storefront directory


Code:
{* $Id: products.tpl,v 1.45.2.11 2004/12/01 15:15:49 mclap Exp $ *} {if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_selected_button.tpl"} {include file="modules/Feature_Comparison/products_check_js.tpl"} {/if} {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} {assign var="discount" value=0} <TABLE border="0" width="100%"> <TR> <TD width="90" align="center" valign="top"> {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {$lng.lbl_see_details} {else} <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}{if $featured eq 'Y'}&featured{/if}">{include 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> {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0 && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} {/if} </TD> <TD valign="top"> <FONT class="ProductTitle">{$products[product].product}</FONT> {$lng.lbl_sku}: {$products[product].productcode} <FONT size="1">

Code:
{* // 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]http://www.RobinsCollectables.com/Images/New.gif[/img]

Code:
{/if} {$products[product].descr|truncate:300:"...":true} </FONT> <HR size="1" noshade width="100%" align="left"> {if $products[product].product_type eq "C"} {include file="buttons/details.tpl" href="product.php?productid=`$products[product].productid`&cat=`$cat`&page=`$navigation_page`"} {else} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%d" assign=discount} {if $discount gt 0} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> {include file="currency.tpl" value=$products[product].list_price} </S></FONT> {/if} {/if} <FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><FONT class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}, {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes} <TABLE border="0"> <TR> <TD>[img]{$ImagesDir}/spacer.gif[/img]</TD> <TD>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes} </TR> </TABLE> {/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/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} {/if} </TD></TR> </TABLE> {/section} {if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_selected_button.tpl"} {/if} {else} {$lng.txt_no_products_found} {/if} {/if}
__________________
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
Reply With Quote
  #12  
Old 12-30-2004, 08:53 PM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Does it have any thing to do with the fact that I have in my store the items display in 3 columns?

Still not working.......


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.
Reply With Quote
  #13  
Old 01-04-2005, 08:02 AM
 
PersonalizedFitness PersonalizedFitness is offline
 

Advanced Member
  
Join Date: Oct 2004
Location: Omaha, Nebraska
Posts: 93
 

Default

I posted the code and it worked .. no problems .. very nice - Thank You for sharing. http://www.vitamancafe.com/store/customer/home.php?cat=345
__________________
http://www.VitaManCafe.com
There is Nothing \"General\" about our Nutrition Center!
X-Cart version 3.5.1 | Operation System Linux

http://www.exercisewisdom.com
X-Cart Gold Version 4.0.1 | Operation System Linux
Reply With Quote
  #14  
Old 01-04-2005, 08:16 AM
  ETInteractive.com's Avatar 
ETInteractive.com ETInteractive.com is offline
 

X-Adept
  
Join Date: Dec 2002
Posts: 747
 

Default

Quote:
Originally Posted by rjcbear
Does it have any thing to do with the fact that I have in my store the items display in 3 columns?

Still not working.......


Kind regards,
Ricky

If you have multiple columns I believe you need to edit "products_t.tpl"

try that.
__________________
ETInteractive.com
X-Cart 3.5.x
Reply With Quote
  #15  
Old 01-04-2005, 09:16 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

Thank you I will try that later today and I will let every one know the outcome.

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.
Reply With Quote
  #16  
Old 01-04-2005, 10:48 AM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

This little mod actually looks pretty cool.

I just may give it a whirl to see how it does.

Thanks for sharing!
__________________
vs 4.1.12
Reply With Quote
  #17  
Old 01-04-2005, 12:43 PM
 
ghhoz ghhoz is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 40
 

Default

Thanks for a wonderful mod. I have this working on my site in a 3 column layout too for those that mentioned problems in a 3 column cart.

Cheers
__________________
Cheers from Melanie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xcart V4.0.4 (Unix) - LIVE
AOM, Fancy Categories
Marketing Manager,
Reward Points & Refer Rewards
Advanced Site Map
Easy Checkout

Gift & Homeware House
www.giftandhomewarehouse.com.au
Reply With Quote
  #18  
Old 01-05-2005, 09:46 AM
  rjcbear's Avatar 
rjcbear rjcbear is offline
 

X-Adept
  
Join Date: Jun 2004
Location: Alabama,U.S.A
Posts: 503
 

Default

ETInteractive.com
Quote:
If you have multiple columns I believe you need to edit "products_t.tpl"

I am de the modification to the tpl above and yes it does work. So if you are using more than one colunm edit products_t.tpl.

Thank you so much every one.

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.
Reply With Quote
  #19  
Old 01-05-2005, 10:09 AM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Definatley works in 4.0.9

I wouls like to know how to add it to the standard product detail page also, this would be nice addition.

As it stands, the only place this icon will show is in my features mod (nice) and in the mail catagory listing.

If you go to individual page, it does not show.

Any ideas out there?

Thanks for the mod, It is a nice touch.
__________________
vs 4.1.12
Reply With Quote
  #20  
Old 01-05-2005, 11:56 AM
  CC's Avatar 
CC CC is offline
 

eXpert
  
Join Date: Jun 2004
Posts: 349
 

Default

I havent tested this, but see if this works in customer/main/product.tpl:

Code:
{* // 60 * 60 * 24 * 20 days in unix time = 1728000 *} {if ($product.add_date gt $smarty.now - 1728000) and ($product.add_date lt $smarty.now)} [img]{$ImagesDir}/mynew.gif[/img] {/if}

If you have this showing after the product name inside the main table on the product page the code has to be altered to fit within the dialog code.

All of that is untested, but i am sure it will work.
__________________
XC 4.2 inc (unofficial) patch release.
Reply With Quote

The following user thanks CC for this useful post:
lash (11-08-2009)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:52 AM.

   

 
X-Cart forums © 2001-2020