X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   getting the product image location (https://forum.x-cart.com/showthread.php?t=63243)

dSiebert 04-10-2012 10:04 AM

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.

balinor 04-10-2012 10:10 AM

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}

cflsystems 04-10-2012 10:10 AM

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

dSiebert 04-10-2012 04:17 PM

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.

dSiebert 04-10-2012 04:17 PM

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.

cflsystems 04-10-2012 04:43 PM

Re: getting the product image location
 
Oh your version is 4.1.8, this is not available there, sorry.

gb2world 04-10-2012 07:56 PM

Re: getting the product image location
 
http://forum.x-cart.com/showthread.php?t=44543

---

balinor 04-11-2012 05:06 AM

Re: getting the product image location
 
No need to re-invent the wheel:

http://forum.x-cart.com/showthread.php?t=62293&highlight=pinterest

qualiteam 04-12-2012 01:34 AM

Re: getting the product image location
 
Note: Built-in Pinterest support introduced in 4.5.0


All times are GMT -8. The time now is 05:18 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.