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

Need a little help ;)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-23-2002, 06:31 AM
 
Jonny Jonny is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 67
 

Default 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.
Reply With Quote
  #2  
Old 12-23-2002, 07:22 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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.
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 12-23-2002, 07:29 AM
 
Jonny Jonny is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 67
 

Default

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.
Reply With Quote
  #4  
Old 12-23-2002, 07:42 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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

What are you trying to achieve?
__________________
ex x-cart guru
Reply With Quote
  #5  
Old 12-23-2002, 08:39 AM
 
Jonny Jonny is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 67
 

Default

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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:03 PM.

   

 
X-Cart forums © 2001-2020