• Resolved bbua97

    (@bbua97)


    Hey there,

    I’m currently trying to find everything out and so far I’m very happy about what you guys created there!! Is it somehow possible to pull out the price of a product dynamically on any page? I’m trying to build a page with price tables and it would be great to pull out the price dynamically and also the taxes.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andre Gagnon

    (@2winfactor)

    Yes, of course! You can use our php models. If you have the price ID, you can fetch it like this:

    
    <?php 
    $price = \SureCart\Models\Price::find('123456789asdfasdf');
    $price->amount; // price amount (without a decimal)
    $price->currency; // price currency
    

    https://developer.surecart.com/docs/models/Price/find

    We do cache this smartly so you are not making an http request each time.

    Any questions, let me know.

    • This reply was modified 2 years, 6 months ago by Andre Gagnon.
    • This reply was modified 2 years, 6 months ago by Andre Gagnon.
    Thread Starter bbua97

    (@bbua97)

    Thanks for your reply! I’m still trying to find out what’s the best way to use this with Elementor on my page. Maybe you could give me a hint on how to do it? ????

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Price Information’ is closed to new replies.