| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Smarty Variable List/Guide | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm back under the hood working on the sites again, and in need of a list of smarty variables that x-cart uses. I could have sworn that there was a guide/list/tutorial here on the forums at some point, but try as I might I haven't been able to find it. Can anyone assist?
Much thanks as always. Peter
__________________
X-Cart version 4.1.8 (unix) http://www.kimbrushes.com http://www.buypermasetinks.com http://www.ecoprintworks.com |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Your best bet is to use the webmaster mode console to see all the smarty variables and their settings per page load.
For your version - the smarty variables are not present by default in webmaster mode. This tip explains what to do to see them. This thread contains a method to modify it so your webmaster mode can switch between template listing and smarty variables. ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#3
|
|||||||
|
|||||||
![]() Thanks so much, gb. I'll look into the modification. Although embarassing, it might make sense to ask about a particular variable:
On my product page, I'm trying to create a breadcrumb - so I need to display the category related to that particular product. I could not find it in the $product array. Any thoughts?
__________________
X-Cart version 4.1.8 (unix) http://www.kimbrushes.com http://www.buypermasetinks.com http://www.ecoprintworks.com |
|||||||
#4
|
|||||||||
|
|||||||||
![]() If you are assigning an individual product to many categories - to my knowledge, the default installation of X-Cart does not query for every possible category in which a product can be and provide that in smarty.
In the product array - you are provided with what you what you have set to be the Main category. That is what X-Cart uses to build its breadcrumb. (It is not a true navigation breadcrumb that traces how you navigated to the product page.) So, when you say "the category related to that particular product", it is unclear what you mean. If you mean the main category - it should be in the product array. If you mean something else - it might not be available by default in smarty. ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#5
|
|||||||
|
|||||||
![]() sorry... should have been more clear. each product is assigned/associated with only one parent category. within the $product array, I'm only finding the category ID. I guess I could do an if/then statement, like if catid=950 then display 'eye brushes'. prefer something a bit cleaner, but it may have to do.
hmm.... :\
__________________
X-Cart version 4.1.8 (unix) http://www.kimbrushes.com http://www.buypermasetinks.com http://www.ecoprintworks.com |
|||||||
#6
|
|||||||||
|
|||||||||
![]() If the information you need is not there - then you have to add a query to the php to get it.
The query that got the catid can be modified to also get the name. Are you sure it is not there? The default x-cart installation already has a breadcrumb that has the name. I also thought there was a $current_category array with the information. If you look at the tips I originally posted, you should be able to search in the webmaster mode for these variables. ---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|