Display price options from one multi-list with their assigned product of a different multi-list.

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 26, 2017   (RSS)

By Dave - October 16, 2017

Hi Zicky, 

You're going to need to load all the "additionalPricingRecords" for each product displayed, and you're displaying all the products, so you might as well load all the product_pricing_options records.  Then you could loop over all of them for every product_listings record only showing those where assign_to_product matches the product num.

So you'd just remove the "where" from the block that loads from product_pricing_options and add a line (in red): 

<?php foreach ($additionalPricingRecords as $recordAddition): ?>
  <?php if ($recordAddition['assign_to_product'] != $record['num']) { continue; } // skip additions that don't match product ?>

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By Mikey - October 26, 2017

Hey Dave,

Thanks for the guidance - that did the trick.