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

getting the product image location

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-10-2012, 10:04 AM
 
dSiebert dSiebert is offline
 

Newbie
  
Join Date: Apr 2012
Posts: 3
 

Default getting the product image location

I have been drafted by my wife to work on her website so I am new to Smarty and X-Cart but not programing so please bare with me.
I need to locate the product image location in the template skin/customer/main/product.tpl
I see what looks like an object called $product but I have no idea what the fields are of the object or how to dump them. I turned on debug and that was of little value to me so any help would be really handy at this point.
__________________
Version 4.1.8
X-SpecialOffers
X-AOM
Reply With Quote
  #2  
Old 04-10-2012, 10:10 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: getting the product image location

Images are stored in the images/ directory - each different type is stored in a different folder T for thumbnails, P for product images, etc. What exactly are you looking to do?

This is the call in product.tpl:

{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{include file="modules/Detailed_Product_Images/popup_image.tpl"}
{elseif $product.force_image_type eq 'W' && $product.variantid}
{include file="product_thumbnail.tpl" productid=$product.variantid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="W"} 
{else}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"} 
{/if}
{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-10-2012, 10:10 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: getting the product image location

Turn on the debug console and make sure you check the box to show the variables - it is in admin settings as well. Then you can see all variables and their values for a page in the debug console
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 04-10-2012, 04:17 PM
 
dSiebert dSiebert is offline
 

Newbie
  
Join Date: Apr 2012
Posts: 3
 

Default Re: getting the product image location

Quote:
Originally Posted by balinor
Images are stored in the images/ directory - each different type is stored in a different folder T for thumbnails, P for product images, etc. What exactly are you looking to do?

I am adding a pinterest button
I pulled the description by using this {$product.descr} and I was really hoping that I could get the the image with something like {$product.image} but so far no joy. If I could just see what is in $product it might help but I can not find any real documetion on what that variable contains.
__________________
Version 4.1.8
X-SpecialOffers
X-AOM
Reply With Quote
  #5  
Old 04-10-2012, 04:17 PM
 
dSiebert dSiebert is offline
 

Newbie
  
Join Date: Apr 2012
Posts: 3
 

Default Re: getting the product image location

Quote:
Originally Posted by cflsystems
Turn on the debug console and make sure you check the box to show the variables - it is in admin settings as well. Then you can see all variables and their values for a page in the debug console
Where might that be? I looked under general and didn't see it.
__________________
Version 4.1.8
X-SpecialOffers
X-AOM
Reply With Quote
  #6  
Old 04-10-2012, 04:43 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: getting the product image location

Oh your version is 4.1.8, this is not available there, sorry.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 04-10-2012, 07:56 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: getting the product image location

http://forum.x-cart.com/showthread.php?t=44543

---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #8  
Old 04-11-2012, 05:06 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: getting the product image location

No need to re-invent the wheel:

http://forum.x-cart.com/showthread.php?t=62293&highlight=pinterest
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 04-12-2012, 01:34 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: getting the product image location

Note: Built-in Pinterest support introduced in 4.5.0
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 08:44 PM.

   

 
X-Cart forums © 2001-2020