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

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

Hey Dave,

Thanks for the guidance - that did the trick.