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
  #41  
Old 08-07-2009, 08:18 AM
 
badgesales badgesales is offline
 

Advanced Member
  
Join Date: Mar 2005
Location: San Diego
Posts: 53
 

Default Re: How to show "New Arrival!" Icon

moolman where in products_t.tpl did you insert the code

Thanks
__________________
www.photobadge.com
Version 4.2
PHP 4.4.7
SQL 4.1.22
Free BSD
7Dana Skin
CDSEO
1 Page Checkout
Reply With Quote
  #42  
Old 11-08-2009, 01:14 AM
 
lash lash is offline
 

Senior Member
  
Join Date: Oct 2006
Posts: 138
 

Default Re: How to show "New Arrival!" Icon

Instead of the pic I get this showing up:

[img]/skin1/images/new_product.gif[/img]

Do I have to change the image links, how to call for the images in 4.1.9?
__________________
4.1.9
www.lash.se
Reply With Quote
  #43  
Old 11-08-2009, 09:33 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: How to show "New Arrival!" Icon

Try this <img src="{$ImagesDir}/new_product.gif" alt="new" />
This is of course assuming your image is in the skin1/images directory.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following 2 users thank JWait for this useful post:
lash (11-08-2009), techdesign (01-27-2010)
  #44  
Old 11-08-2009, 08:48 PM
 
lash lash is offline
 

Senior Member
  
Join Date: Oct 2006
Posts: 138
 

Default Re: How to show "New Arrival!" Icon

Quote:
Originally Posted by JWait
Try this <img src="{$ImagesDir}/new_product.gif" alt="new" />
This is of course assuming your image is in the skin1/images directory.

Thank you very much. That works. I am glad this forum has ppl like you!

I got it to work in 4.1.9:

Just like Dsparks said:

1. Add your graphic file in folder "skin1/images". I named my graphic file "skin1/images/mynew.gif

2. Add the following code to the file "skin1/customer/main/products.tpl" :

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 src="{$ImagesDir}/mynew.gif" alt="New!" />

I added mine on line 22. If you done this it should display this pic on the product pages if you have any new products.

If you want it at detailed product pages you have to add this in product.tlp
Add 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 src="{$ImagesDir}/mynew.gif" alt="New!" /> {/if}

I added my at line 30, but you might have to test around a little bit to see where it ends up and what fits your site.

So from the original code I just changed how to call for images according to Jwaits suggestions.
__________________
4.1.9
www.lash.se
Reply With Quote

The following 2 users thank lash for this useful post:
am2003 (03-05-2011), TheWrongGrape (05-14-2010)
  #45  
Old 06-03-2010, 11:30 PM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

Advanced Member
  
Join Date: Feb 2010
Location: Portugal
Posts: 38
 

Default Re: How to show "New Arrival!" Icon

Works on 4.2.2
__________________
PHP 5.2.11
MYSQL 5.0.45

WESH UK hosting

--- Add-ons -----
X-RMA
X-AOM
X-FancyCategories
X-Feature comparison

BCSE Request a Quote
BCSE Customer Testimonials
BCSE Advanced ratings and reviews
BCSE Customer reward points
BCSE Reward points refferal
BCSE Customer polls

Cart Labs - Tabs
Reply With Quote
  #46  
Old 09-24-2012, 01:07 PM
 
24md 24md is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: United Kingdom
Posts: 44
 

Default Re: How to show "New Arrival!" Icon

Anyone got this working for version 5.2?
__________________
www.anime-on-line.com
4.5.2 (live)
php 5.3.17
mysql 5.5.27
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 10:47 PM.

   

 
X-Cart forums © 2001-2020