I need to display a graphic on the PROD screen for products assigned to one specific category. I played around a little bit with the Toolkit function but then sadly told myself I need to stop doing that. I need something that checks IF the product is in category code do this.
Announcement
Collapse
No announcement yet.
Conditional for products assigned to a category
Collapse
X
-
Conditional for products assigned to a category
Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Tags: None
-
You would use this:
https://docs.miva.com/api-functions/...oduct_assigned
like this or so:
<mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Offset_Product_Assigned(l .settings:product:id,0,'','',0,l.null, l.settings:assigned_categories )" />
Then loop through the assigned_categories array and look for the specific one you're after and display the banner.Colin Puttick
Miva Web Developer @ Glendale Designs
-
It truly helps if you make sure the category code is exactly as the code appears (cAsE seNsiTive).Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
What's easier than trying to match case sensitive is using tolower() in your conditional to force that in your favour
http://www.mivascript.com/item/tolower.htmlColin Puttick
Miva Web Developer @ Glendale Designs
Comment
-
Personally, I'd go with using a product custom field, as category codes can change.Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
Comment