Announcement

Collapse
No announcement yet.

Display Specific Product Price

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Display Specific Product Price

    Hi,

    I may be over thinking this but is there a way to display the price of a specific product on a page? I am completely drawing a blank on this.

    I have a page that we are showcasing some products on. Just want to make sure the price being displayed is always current without having to worry about manually changing that as well on the page.

    The code for the item is FRP1001.

    Thanks,
    Mike


    #2
    If you know the product id or code, sure.

    <mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_ID(id, l.settings:off_page_product)" /> (can use Product_load_code as well)
    Then &mvt:off_page_product:formatted_price;

    will get you the price.

    Now, the tricky part is where is the context of the display. For example, if the text wherein you are referring to the price is in a non-template field like the product description, you'd have to use the above call to get each such product on that page, place that in a div like <span class="some-hidden-class" id={product_code}>&mvt:off_page_product:formatted_ price;</span>

    Than in the description use

    "This is a great product, but a less expensive version, the Beast Master Basic (<span id="target_{product_code}"></span>) is avail here!"

    Than use jQuery to get the price from the hidden div and place it in the target div.

    Hope that makes sense. getting over cold+allergy / no-sleep
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Thank you, I think I caught whatever you have - LOL!

      I was trying to work with this yesterday and had to step away. I only need the price, nothing else. Could I trouble you for coding it for this item? Product Code: MM_SMAIL

      Comment


        #4
        <mvt:do file="g.Module_Library_DB" name="l.success" value="Product_Load_Code('MM_SMAIL', l.settings:off_page_product)" />
        &mvt:off_page_product:formatted_price;

        (note, this has to be in a managed templated, i.e, the template field has version control.)
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Thanks for the help. I was trying to display that on an FAQ page so I will work on that.
          Last edited by mstella1; 07-12-22, 06:13 AM.

          Comment

          Working...
          X