Jump to content

Recommended Posts

Posted

Ok got it. I had to access children of children. The $release is from another foreach loop where I'm getting the page's children and with the below code I'm getting the children of children with only one and lowest value from a float field.

<?php foreach($release->children("limit=1, sort=pad_price") as $p) { ?>
<?= $cart->renderPriceAndCurrency($p->pad_price) ?>
<?php } ?>

 

  • Like 1
Posted

You could also just do this. By using "first()" you avoid the need for the foreach loop.

$cart->renderPriceAndCurrency($release->children("limit=1, sort=pad_price")->first()->pad_price);
 
  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...