1. In the store, each logged customer has own prices (depending on discounts he/she's got) for all products.
  2. Therefore all prices are being pulled via AJAX call so that Full Page Caching is still available to use.
  3. On product page it is simple as one AJAX call has to be performed to get product price.
  4. How to achieve it on category page where you can find 30-60-90 products? Each product in the list needs to perform own AJAX call.

Please advice me on this. Thanks!

1 Answer 1


Solved. In phtml template:

<div class="price-container price-final_price tax">
    <span data-price-type="finalPrice" class="price-wrapper ">
        <span class="price" id="price-section-<?php echo $productId ?>">
], function($, priceCollector){
    priceCollector(<?php echo $productId ?>).done(
            $('#price-section-<?php echo $productId ?>').html(response[1]);

The above performs AJAX query for every product in the list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.