| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Product SKU on search results | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Product SKU on search results
I have about half of this working, but it is just not pulling the Product Code. I've used this elsewhere and it is working fine. Just not on the search results page.
Code:
I've entered the above into */customer/main/products.tpl* and I know I'm missing something, I just don't know what it is. I've entered as below: Code:
Can someone advise me as to what I'm missing here?
__________________
Best Regards, Sam Solace - Pres/CEO Century Performance Center, Inc. http://www.centuryperformance.com (3) sites using X-Cart 5.3.5.5 X-Payments Enterprise 3.1.4 |
|||||||||
#2
|
|||||||||
|
|||||||||
If that is the EXACT code you are using, you are missing an "s"
Product SKU: [b]{$product(HERE)[product].productcode}
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#3
|
|||||||||
|
|||||||||
Adding an "s" makes no difference at all.
I have used that exact code Code:
I have so far been able to get rid of the "productid" and change it to the SKU in: Modify Products and other areas. Anyone with another suggestion?
__________________
Best Regards, Sam Solace - Pres/CEO Century Performance Center, Inc. http://www.centuryperformance.com (3) sites using X-Cart 5.3.5.5 X-Payments Enterprise 3.1.4 |
|||||||||
#4
|
|||||||||
|
|||||||||
Did you actually try it ? You see, the $products variable is being parsed from the php script itself, which outputs to smarty, there is no way the script will recognize an unpassed variable.
See it for yourself in /customer/products.php at the end of the script: Code:
If it has been usefull in other parts, it is only because those other parts use a different variable assignation scheme (even if similar, but not the same, since 1 character makes a worlds difference). Oh, and also close your bold tag properly, this could lead to other output damage on the design side.
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#5
|
|||||||||
|
|||||||||
This is where it does NOT work: (you will see text above the thumbnail, but no product sku)
http://216.82.68.68/shop/customer/search.php?substring= This is where it does work: http://216.82.68.68/shop/customer/product.php?productid=16143&cat=0&page=1 In the example that works, I'm using: Code:
I've tried everything else I know of (and I'm just staring to learn PHP and Smarty) including:
I also have it working (same as above) in place of ProductID on the Modify Products page in the admin section. You would think that if it works in 2 out of 3 spots, it should somehow work in the 3rd. I'm sure this has to be something very simple
__________________
Best Regards, Sam Solace - Pres/CEO Century Performance Center, Inc. http://www.centuryperformance.com (3) sites using X-Cart 5.3.5.5 X-Payments Enterprise 3.1.4 |
|||||||||
#6
|
|||||||||
|
|||||||||
Now I get the picture, should of seen your site earlier.
Guess what, you are editing the wrong file. It shows ok for your product details (products.tpl) but not your listed products. Products are listed by category as well as search results with this file: products_t.tpl
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#7
|
|||||||||
|
|||||||||
Editing that file has made no difference. I've tried entering the code and it never shows up on the search results page. Are you sure you're looking at the correct link I gave in the previous post?
__________________
Best Regards, Sam Solace - Pres/CEO Century Performance Center, Inc. http://www.centuryperformance.com (3) sites using X-Cart 5.3.5.5 X-Payments Enterprise 3.1.4 |
|||||||||
#8
|
|||||||||
|
|||||||||
Sorry, you're right, it is in products.tpl, but the code is:
Code:
But I dont know why it wouldnt show. Im new to smarty as well, although I cannot find any logical reason for it not to show if you have entered it like that. Im going to have a look at the php scripts as well, maybe its a query at the search engine that doesnt look for the productcode by default. Note: just for the heck of it, could you try as above (without the product sku initial note and bold tags ?
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#9
|
|||||||||
|
|||||||||
Just verified it on my own site, works without any problem and just the way I mentioned on my first post, I really dont know what you are doing wrong, this is the code Im using:
Code:
__________________
It doesn\'t matter what is done... it is how it is done. ============================= XCart Version: 3.5.3 -> Dmcigars.com XCart Version: 4.1.3.... |
|||||||||
#10
|
|||||||||
|
|||||||||
Maybe I just have some "cache bugs" or something. I tried it this morning the same way I did last night ... now it works.
I'm happy it is working, but curious as to why it decided not to work last night. Thanks for the help Leon!
__________________
Best Regards, Sam Solace - Pres/CEO Century Performance Center, Inc. http://www.centuryperformance.com (3) sites using X-Cart 5.3.5.5 X-Payments Enterprise 3.1.4 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|