Announcement

Collapse
No announcement yet.

Add Quantity Element field to Attribute Machine & Include in Price_Update Function

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

    Add Quantity Element field to Attribute Machine & Include in Price_Update Function

    Although I was late to the realization party, I think it is great that the Attribute Machine Price_Update function now works without inventory variants being used.

    I think it would be helpful if it also took the quantity field into consideration.

    Perhaps by adding a "Quantity Element" field to the Attribute Machine settings on PROD, as well as working that element/value into the AttributeMachine.js file.

    That way all that needs to be done in the admin is entering the id of the Quantity Element.

    For now I've created a workaround but it forced me to copy and paste the whole Price_Update function inorder to make it all work together.

    Attached Image: At the end of the Attribute Machine Head template, I pasted the Price_Update function and then added the code outlined in red.

    Attr-Mach-Qty-Price-Update.png

    This seems to work well although it felt like a bit of a hack IMO.
    Nick Harkins
    www.loveisarose.com
    *Web Developer
    *Miva
    *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads
Working...
X