We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33238
    • 388 Posts
    Hello everyone.

    I'm trying to use a shopkeeper placeholder to show the price information in the top corner of a page.

    [[+shk.price_total]]

    Supposedly according to the documentation it should works:


    Placeholders on the page
    On the page where the snippet Shopkeeper are called placeholders:
    [[+shk.price_total]] - Total purchase price.
    [[+shk.items_total]] - The number of items in the cart.
    [[+shk.items_unique_total]] - The number of unique items in the cart.
    [[+shk.currency]] - Currency.

    and technically works because it is displaying the shop price, BUT is not refreshing when there are changes in the cart like add new products or change quantities.

    mThis is my shopkeeper call:
    [[!Shopkeeper@custom? &propertySetName=`custom` &noJQuery=`1` ]]
    (I'm loading jquery manually and everything works very well)

    someone with experience using shopkeeper, any advices?

    Thank you very much!!!

    This question has been answered by whitebyte. See the first response.

      --
      ysanmiguel.com
    • discuss.answer
      • 49529
      • 196 Posts
      Hi.
      Placehlders are parsed only on page load. If you update you cart via AJAX, placeholders will not update automatically. You should use JS-callback:
      <script>
      function SHKloadCartCallback(){
          $('#items_total').text(SHK.data.items_total);
          $('#price_total').text(SHK.data.price_total);
      }
      </script>
      
        • 33238
        • 388 Posts
        Works like MAGIC!!!!

        Thank you very very much mate. wink
          --
          ysanmiguel.com