I am integrating the reorder ability in Order Status mod for Merchant5. The only thing I can't get to work is the conditional for disallowing inactive products. I am using:<br> <br> %begin_if|Products.d.active|%<br> %quantity|001|%<br> %addtobasket%<br> %end_if%<br> %begin_if|NOT Products.d.active|%<br> NOT AVAIL<br> %end_if%<br> It is always showing NOT AVAIL even if the product is active.
The problem with the %begin_if not working has to do with the way
Merchant 5x works. In 4.x once the Products database was open and
pointing to the correct database you could access the data directly
with the database fields. In 5.x Merchant opens the databases only long
enough to read the data once, then closes them. To counter this I have
loaded the product data into a structure g.StatusProduct that can be
accessed in the %begin_if code. Basically, in your code, replace
Products.d. with g.StatusProduct:.
eg. your code becomes:
%begin_if|Pg.StatusProduct:active|%
%quantity|001|%
%addtobasket%
%end_if%
%begin_if|NOT g.StatusProduct:active|%
NOT AVAIL
%end_if%
Last update: 2007-03-29 09:57
Author: Thor
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- Alternate ways to display the product and attribute data ... (2008-09-02 18:40)
- Adding both "Add All to Basket" and "Add to ... (2008-09-01 09:46)
- When adding a product to the basket from an ... (2008-08-27 19:02)
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
Top 10 
- 2939 views:
Adding Tokens to Evaluate Expressions - 2866 views:
Is there a way to "Limit" the number of ... - 2791 views:
Why won't you call me for technical support? I ... - 2678 views:
Are license keys valid for more than one store? ... - 2577 views:
I'm trying to enter a license key and get ... - 2566 views:
How do I install a module? - 2409 views:
How do I check for a module upgrade? - 2372 views:
How can display and change the parameters of an ... - 2217 views:
The total on my checkout pages are not correct. ... - 2016 views:
I have select and radio type attributes in my ...
















