Announcement

Collapse
No announcement yet.

Which price group was used?

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

    Which price group was used?

    Need to do this in SMT. On a product page, PROD, I am needing to know which Price group was used to determine the discount price? The discount price is created when the product is loaded so the price is there. I just need to know how it got there. Any ideas?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    The following are in the TokenList:
    l.settings:discount:descrip &mvt:discount:descrip; example: 20% off

    Comment


      #3
      There are some library functions that you can call with mvt:do,(or MvDO, if you're writing a module) that will let you do this. You can find out which price group the products is assigned to, and then pull in the group name for display to the customer. Of course, if the product is assigned to more than one group, it might be tricky to figure out which ones are being applied.
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment


        #4
        Not sure why, but the discount variable has the correct values in Tokenlist. Rendering to the PROD page like below leaves nothing. The values appear in the product:discounts array structure.
        Code:
        <mvt:eval expr="l.settings:discount:descrip" /> / <mvt:eval expr="l.settings:discount:pgrp_id" /> / &mvt:product:discounts[1]:descrip; / &mvt:product:discounts[1]:pgrp_id;
        I shouldn't need to do this, but I can assign the value to the discount structure like this:
        Code:
        <mvt:foreach iterator="discount" array="product:discounts">
               <mvt:eval expr="l.settings:discount:descrip" /> / <mvt:eval expr="l.settings:discount:pgrp_id" /> 
        </mvt:foreach>
        I am not seeing if or how the discount structure is being clobbered. But I also am not finding anywhere in the LSK where either product:discounts or just discount array structures are assigned. Maybe my question is, Will the product:discounts array structure only ever have a single index as I've illustrated above? If the index will always be [1] then I will know what the value will be correct.

        Scott

        Need to offer Shipping Insurance?
        Interactive Design Solutions https://www.myids.net
        MivaMerchant Business Partner | Certified MivaMerchant Web Developer
        Competitive Rates, Custom Modules and Integrations, Store Integration
        AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
        My T-shirt Collection is mostly MivaCon T-shirts!!

        Comment

        Working...
        X