| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
get pics from product id | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() hi i have 9000 products with 9000 thumbnail pictures
the picture name is almost the same as my product id E.G. prod Id =A-0020 the picture file is named a0020.jpg i want to knock some code up in my templates to pick the picture path and name up from the product id I know how to string build in vb i just need a bit of help getting rid of the "-" and lowering the case in php....If this works then i can upload my 9000 picture files to the images dir without editing every name individually........ hope this is clear enough ......Andy
__________________
X-cart gold version 4.1.6 |
|||||||
#2
|
|||||||
|
|||||||
![]() in the template within the productid braces put |lower|replace:"-":"" and add the jpg file extension as well as the file directory
ie. images/{$products[product].productid|lower|replace:"-":""}.jpg |
|||||||
#3
|
|||||||
|
|||||||
![]() You can download a program that will go through each file and rename it to your choice, and also change the case. I use the program below and its free.
http://www.bulkrenameutility.co.uk
__________________
Jeff S. http://www.icases.net X-Cart V4.1.6 A search engine that pays you! $.25/hour - click here What is AGLOCO? click here |
|||||||
|
|||
X-Cart forums © 2001-2020
|