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)
-   -   Need a little help ;) (https://forum.x-cart.com/showthread.php?t=1025)

Jonny 12-23-2002 06:31 AM

Need a little help ;)
 
Hi Chaps

I need to get hold of the productid number which is generated by products.php and placed in the $products array

i wish to use this id number in my own code within products.php

any ideas

many thanks

Jonny.

funkydunk 12-23-2002 07:22 AM

This is referred to in the templates as {$products[product].productid} as it is placed into an array by the products.php file and assigned over to smarty.

Jonny 12-23-2002 07:29 AM

Thanks for your reply

I need to know how to reference the variable in the products.php file itself before it gets to the template.

I need to do a if(!file_exists("filename.gif")) command so need to do it before the template stage, but it references to the product id

Cheers

Jonny.

funkydunk 12-23-2002 07:42 AM

I would put that in towards or at the end of the products.php file.

What are you trying to achieve?

Jonny 12-23-2002 08:39 AM

We have decided to have images & thumbnails on the server rather than in the database due to the bad quality that resizing the thumbnails gives.

So i need to do a check to see whether the images exists to determine whether to display the image or a no image available image.

I have managed to do this for product.php as the productid is carried over in the URL, but on products.php there are obviously more than 1 product.

cheers

Jonny


All times are GMT -8. The time now is 04:47 AM.

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