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

Add a product thumbnail to tell-a-friend email & invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #51  
Old 01-20-2010, 11:54 PM
  TBone's Avatar 
TBone TBone is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 38
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

Works great! Thanks Jon.


Quote:
Ive tried it in 4.1.9 and it works great but puts the image under tthe product description. I would like to know what code is needed to resize the thumbnails, as not all my thumbnails are the same size, and makes the invoice huge.

Just replace the image_x and image_y values. I use image_x="50" image_y="50". If your images are 'HUGE' this means that your normal product images are not well optimized. Maybe you should give that some attention.
__________________
_____________________________________________
www.webcreatives.nl | X-Cart Shops
X-Cart Versions 4.1.x | 4.2.x | 4.3.x | 4.4.x
Parallelweg 124-14, 1948 NN BEVERWIJK
The Netherlands
Reply With Quote
  #52  
Old 04-18-2010, 05:24 AM
 
gita gita is offline
 

Member
  
Join Date: Jan 2010
Posts: 10
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

Does this work in 4.3?
Thanks
Gita
__________________
Trying to get my site up and running with xcart 4.3
Reply With Quote
  #53  
Old 06-03-2010, 08:02 AM
 
adriant adriant is offline
 

Senior Member
  
Join Date: May 2006
Posts: 190
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

None of these seemed to work for me in 4.3 so decided to fiddle about with and see if I can get it going.

It would appear to me that the current code is for images that are held in the database, I may be wrong.

Also when you look at the code from the 'sent' email, it appears that it is not sending the complete url for the site.

Here is what I did, it may be clumsy, my apologies.

in mail/html/send2friend.tpl
added the following line above {$product.descr}<br />

{include file="stf_product_thumbnail.tpl" productid=$product.productid product=$product.product}</a>

Then I made a copy of

skin1/product_thumbnail.tpl

and called it

stf_product_thumbnail.tpl

then on the line that reads

image.php?type={$type|default:"T"}&amp;id={$produc tid}

I changed it to

http:\\www.your-url.eu\your-dir\image.php?type={$type|default:"T"}&amp;id={$pr oductid}

and it seems to work.

* I just previewd this message and the editor seems to have put an odd space the word 'productid' - there shouldn't be a space *
__________________
Xcart gold Plus V4.7.12
REBoot(REdux)

https://www.serpro.co.uk
Reply With Quote
  #54  
Old 06-16-2010, 07:27 AM
  isaels@i-artsupplies.co.u's Avatar 
isaels@i-artsupplies.co.u isaels@i-artsupplies.co.u is offline
 

Advanced Member
  
Join Date: May 2010
Posts: 67
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

Well guess what,

Ive tried all these and nothing works!!
__________________
Paul Wallace

X-Cart Gold 4.3.2
Php5.3.8
MySQL 5.1.56

Backorder/PreOrder
SEO All in one CDSEO
Wholesale Option Pricing
Gift Cert Recovery
Password Recovery
CompanyLogo Alt Tag
Smart Search - ALtered Cart
On Sale - Altered Cart
Sitemap
MM One page checkout
order page emailer

Remember Anomymous Carts
Website CM Speed Opitmisation

iartsupplies.co.uk
Reply With Quote
  #55  
Old 06-16-2010, 07:48 AM
 
adriant adriant is offline
 

Senior Member
  
Join Date: May 2006
Posts: 190
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

You could go to my site:
http://www.serpro.eu/shop1

click on a product and its full details and then send yourself a 'send to friend' and see what happens.

I send them to myself all the time as customers want product details by email when they call for a quote.
__________________
Xcart gold Plus V4.7.12
REBoot(REdux)

https://www.serpro.co.uk
Reply With Quote
  #56  
Old 10-22-2010, 02:33 AM
  Phoenixone's Avatar 
Phoenixone Phoenixone is offline
 

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

Default Re: Add a product thumbnail to tell-a-friend email & invoice

Tried all these too and no success
4.2.3
__________________
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
  #57  
Old 06-29-2011, 12:09 AM
 
adriant adriant is offline
 

Senior Member
  
Join Date: May 2006
Posts: 190
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

Having upgraded to 4.4 needed to make it work for that version.

None of our images are held in the database, they are all files.

Here is what I did.

in skin/common_files/mail/html/send2friend.tpl
added the following line above {$product.descr}<br />

{include file="stf_product_thumbnail.tpl" productid=$product.productid product=$product.product}</a>

Then in skin/common_files/ created a file called

stf_product_thumbnail.tpl

containing;

{*
$Id: stf_product_thumbnail.tpl,v 1.0 2011/06/29 08:57:58 joy Exp $vim: set ts=2 sw=2 sts=2 et:
*}
{strip}
<img src="{$http_location}/image.php?id={$productid}" width="150">
{/strip}

---------------------
Have just done this on 4.5 and it works perfectly for me. You can test it on the site.
__________________
Xcart gold Plus V4.7.12
REBoot(REdux)

https://www.serpro.co.uk
Reply With Quote
  #58  
Old 04-21-2012, 07:37 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Add a product thumbnail to tell-a-friend email & invoice

I used this http://www.websitecm.com/articles/x-cart-product-images-on-x-cart-invoices-and-emails/

I'm trying to do this on my 4.3 site and I get the following error when I switch an order to Processed. It worked fine on my test site.

This is in the spot where the image should be

Warning: require_once(/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/littlepu/public_html/admin/auth.php on line 44

Fatal error: require_once() [function.require]: Failed opening required '/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/littlepu/public_html/admin/auth.php on line 44
__________________
X-Cart 4.3
Joomla
Among other things
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 06:15 AM.

   

 
X-Cart forums © 2001-2020