Announcement

Collapse
No announcement yet.

Anyone know how to get Basket Item Attribute Option Images - no toolkit?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone know how to get Basket Item Attribute Option Images - no toolkit?

    Man, this is stumping me too. I'm trying to use real Miva API calls to get the basket item's attribute option images and also the mini basket. There is a toolkit function that "...works..." but it has no idea about basket:groups or miva's volume pricing and yeah, it's not working for what I want. I've tried going down the trial and error rabbit hole here but it's so time consuming... so maybe somebody at Miva here can give me the series of API calls to get the option image. Please?

    PS: this has to also work when the attribute is from an attribute template. Yeah, sorry! :)

    Colin Puttick
    I solemnly swear that I am up to no good...

  • I figured it out. Just took a bunch of SQL queries to figure out how it all works together, sleuthing tokenlist, then finding and API function... but it looks like this will work.
    https://docs.miva.com/api-functions/option_load_id

    HTML Code:
    ...
    <mvt:foreach iterator="option" array="group:options">
    <mvt:do file="g.Module_Library_DB" name="l.success" value="Option_Load_ID(l.settings:option:option_id, l.settings:option:option_obj)" />
    
    The the attribute option image (if exists) is: &mvt:option:option_obj:image;...
    Colin Puttick
    I solemnly swear that I am up to no good...

    Comment

    Working...
    X

    This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

    This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

    Accept