X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   create thumbs from large image (https://forum.x-cart.com/showthread.php?t=24233)

SMDStudios 11-28-2006 01:14 PM

Re: create thumbs from large image
 
Using 4.1.3 and I have the image saved for product.

does something need to be modified in products_t.tpl?? Looking at the templates it looks like it needs to.???????????

Quote:

Originally Posted by mrkenzie
If you are using 4.0.x, it probably won't work. This was developed on 4.1.x.

If you are using 4.1.x, then make sure you have an image for the product (not thumbnail and not detailed).


mrkenzie 11-28-2006 01:55 PM

Re: create thumbs from large image
 
I did not have to modify anything in products_t.tpl for it to work. When you say your category list, do you mean the product listings? Is there a link where I can see this?

SMDStudios 11-28-2006 01:59 PM

Re: create thumbs from large image
 
Here is the link: http://www.chairsbydesign.com/shop/home.php?cat=1

Quote:

Originally Posted by mrkenzie
I did not have to modify anything in products_t.tpl for it to work. When you say your category list, do you mean the product listings? Is there a link where I can see this?


mrkenzie 11-28-2006 02:15 PM

Re: create thumbs from large image
 
You are right. I did not notice it because I am not using the multi-column format for my product listings.

So find this line of code:
Code:

<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}">{include file="product_thumbnail.tpl" .... }
and add this before the }
Code:

tmbn_path_p=$products[product].p_image_path tmbn_link="false" tmbn_width="100"

That should fix it.

Thanks for pointing that out!

Let me know if it does not work for you.

SMDStudios 11-28-2006 02:34 PM

Re: create thumbs from large image
 
Nope no go. This is what I ended up with..

Code:

<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}">{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 tmbn_path_p=$products[product].p_image_path tmbn_link="false" tmbn_width="100"}</a>

Quote:

Originally Posted by mrkenzie
You are right. I did not notice it because I am not using the multi-column format for my product listings.

So find this line of code:
Code:

<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}">{include file="product_thumbnail.tpl" .... }
and add this before the }
Code:

tmbn_path_p=$products[product].p_image_path tmbn_link="false" tmbn_width="100"

That should fix it.

Thanks for pointing that out!

Let me know if it does not work for you.


mrkenzie 11-28-2006 04:55 PM

Re: create thumbs from large image
 
After </a> put this:
Code:

Path={$products[product].p_image_path}

And see if it ouputs an image path

Also, make sure you clear your templates_c folder and your browser cache.

JWait 11-28-2006 09:56 PM

Re: create thumbs from large image
 
Quote:

Originally Posted by Terrybraley
This is where I got lost " include\func\func.product.php"

No func inside the include folder


I think the big difference between the 4.0.x versions and the 4.1.x versions of x-cart is that function.php was broken up into sections in the newer version... func.product.php is one of those sections.

SMDStudios 11-29-2006 06:54 AM

Re: create thumbs from large image
 
Added that and nothing shows up "Path="

Quote:

Originally Posted by mrkenzie
After </a> put this:
Code:

Path={$products[product].p_image_path}

And see if it ouputs an image path

Also, make sure you clear your templates_c folder and your browser cache.


SMDStudios 11-29-2006 08:05 AM

Re: create thumbs from large image
 
Just wanted to say that I changed the product last back to stanard view and it still doesn't show the thumbnail. I've gone back to review all the steps again and I'm sure I've done all that was needs. Is there anything in the store config that I need to update or change?

mrkenzie 11-29-2006 09:17 AM

Re: create thumbs from large image
 
Make sure you added the code to include\search.php (step 7). It is not pulling the image path from the database.

If that code is added, then find the following in include/search.php around line 730
Code:

else {
                        $search_query .= " LIMIT $first_page, $objects_per_page";
                        $products = func_query($search_query);
                }

and after that put
Code:

echo $search_query;

Then take the output and run it in phpMySqlAdmin or something like it to view the results. See if there is a column named p_image_path and what the value is for it.


All times are GMT -8. The time now is 12:51 AM.

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