Announcement

Collapse
No announcement yet.

Extend arrays

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

  • Extend arrays

    Non-programmer here so may be a dumb idea and I likely won't use all the right terminology. Bear with me.

    I was wondering if it might be possible to add the ability to extend the built in arrays - like product, basket, item, discounts etc so that you can grab additional data stored with that array in your foreachloop

    For example say we have the discount array and we wanted to add some extra variables for longer description, a 'sale' icon or other data

    <mvt:extend array="group:discounts" newvar="sale_graphic">
    <mvt:extend array="group:discounts" newvar="descrip_long">

    <mvt:foreach iterator="discount" array="group:discounts">
    <img src="&mvt:discount:extend: sale_graphic;">
    You qualified for: &mvt:discount:name;!
    <p> &mvt:discount:extend:descrip_long; </p>
    </mvt:foreach>

    Not sure how Miva would handle these behind the scenes but at the MVT code level it seems this might make the programming 'cleaner' in some areas.
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