![]() |
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 |
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:
<?php In my file Price.php (XLite\Module\FactorInteractivo\FooterCasaJorge\Vi ew) I use this function and call it: Code:
protected function participateSale() 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 :( |
Re: How to get a global attribute and handle its value
Anybody any clue on this subject, or is this a "Top secret" subject ;-)
|
All times are GMT -8. The time now is 11:01 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.