| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How do you truncate product title... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I hope someone here can help me with this little problem... I'm trying to remove the last 6 characters (the product id number) from the product title so instead of looking like this:
Galaxy Zone Sticker Pack #17822 it looks like this: Galaxy Zone Sticker Pack I think the code should go something like this: {$products[product].title|truncate:60:"...":true} But since the product title can vary in size, this solution is not acceptable. Is it possible to truncate the last 6 characters only? That way, the whole title appears (minus the id number) regardless of it's size. Thanks.
__________________
X-Cart 5.3.5.4 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Change {$products[product].title}
to {$products[product].product} |
|||||||||
#3
|
|||||||
|
|||||||
![]() Hello Jon, thanks for that info. Works great!. Also, and for the benefit of others, I tried to you use your code on a different page but it didnБ─≥t work so after some fiddling around I discovered {$product.product} got it to do what I wanted (not sure what the difference is though????). Anyway, thanks heaps.
Also Jon, since you so kindly took the time to help me out on this little problem of mine, I also wanted to tell you that your XNews mod is absolutely sensational! It's one of the few mods I've bought where the developer has really thought it through, from the users perspective, and put to market a 'complete' package. I'm really tired of those mods that do the bare minimum and get you to spend more money to get where it should have been in the first place. Well done to you and keep up the good work mate! And to anyone else looking to buy mods for their cart, your first point of contact should be WebsiteCM.com ... great products from a great developer.
__________________
X-Cart 5.3.5.4 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Thanks for the kind words Michael
![]() |
|||||||||
#5
|
|||||||
|
|||||||
![]() Quote:
Where do I find this line? Thanks, Joe
__________________
Version 4.0.18 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() skin1/customer/main/products.tpl
skin1/customer/main/products_t.tpl |
|||||||||
#7
|
|||||||
|
|||||||
![]() Thanks,
I changed it. Why does Xcart start the productid at 16333? Does it matter if this number doesn't coincide with the SKU numbers I'm using? I'm becoming more familiar with the template system but man there are a lot of files to look at. Thankfully only some of them need to be edited. Thanks, Joe
__________________
Version 4.0.18 |
|||||||
#8
|
|||||||
|
|||||||
![]() Quote:
The productid is a auto_increment number in your sql database. Every time you add a Product this number increment. Nothing to worry about it has nothing todo with your sku. ![]()
__________________
Version 4.0.18 The fool wonders, the wise man asks. |
|||||||
#9
|
|||||||
|
|||||||
![]() Yeah but why does it start at 16333? Why not start at 1 like most counting systems do?
It says it is the productid not the index value?
__________________
Version 4.0.18 |
|||||||
#10
|
|||||||
|
|||||||
![]() I've successfully got rid of the SKU on all my products but since I've installed x-configurator I notice my configurable items have SKU's. I've looked in
modules/product_configurator/product.tpl modules/product_configurator/products.tpl modules/product_configurator/products_t.tpl but don't find the above mentioned code. Anybody have a clue? (Perhaps this should have been posted to another section but I thought it was relative to this post.)
__________________
X-cart 4.1.0 X-Configurator 4.1.0 PHP 4.4.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|