| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How to get a global attribute and handle its value | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
How to get a global attribute and handle its value
We are working on a module in X-Cart 5 which according to the value of a global attribute must show an Icon next to a product in the "On sale" products list.
In the route classes/xlite/module/developerID/moduleID/view/price.php we have the following code Code:
and my product TPL is like the following: Code:
At the same time, we have a Global Attribute called "sale" which contains a value of 0 or 1. I need the function "participateSale" to return "True" if the "sale" attribute value for a product is 1. My problem is that I don´t know how to access to that attribute from the current folder I´m working. Any ideas ? Thanks in advance !! X-Cart 5.2.15
__________________
X-Carting since 2006 |
|||||||
#2
|
|||||||
|
|||||||
Re: How to get a global attribute and handle its value
I have advanced with this problem, now i created a new file in "XLite\Module\DeveloperID\ModuleID\View\Product\De tails\Customer" called "Atribute.php"
have the following code: Code:
In my file Price.php (XLite\Module\FactorInteractivo\FooterCasaJorge\Vi ew) I use this function and call it: Code:
But this return an error related with the use of $this when is not a object. ¿They understand my objetive? I need a urgent answer
__________________
X-Carting since 2006 |
|||||||
#3
|
|||||||
|
|||||||
Re: How to get a global attribute and handle its value
Anybody any clue on this subject, or is this a "Top secret" subject
__________________
X-Carting since 2006 |
|||||||
|
|||
X-Cart forums © 2001-2020
|