Announcement

Collapse
No announcement yet.

Using a CUSTOMVAR with a choice?

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

    Using a CUSTOMVAR with a choice?

    Is it possible to have a CUSTOMVAR displayed within the text of a drop down choice?

    I want to have the drop down item list display an items price. EG:

    What size?
    Small - £9.99
    Medium - £12.99
    Large - £19.99

    And the CUSTOMPRICE:SMALLPRICE is set to £9.99 at the site level. Then if I want to change the price of an option I only have to change it once.

    Alternatively is it possible to have a products price shown here? After all the choice actually referrers to a product on my site else where.

    #2
    Hi Smiffy,

    Is this an attribute drop down list generated from Actinic or are you hard coding it within a template?
    Regards,

    Toby Blanchard

    Comment


      #3
      You can use a CUSTOMVAR in a Choice template but it'll display the same value for every Choice (you can only set these values at the Site, Section or Product level).

      I'm afraid you'll have to stick this info into the HTML for Name field on a per Choice basis.

      What you could do (but it's quite a bit of work) would be to put some JavaScript into the Drop Down Choice layout, that looks at the Choice name and displays from an array of extra text depending on that choice.

      BTW. V8 allows you to set things on a per choice basis.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by Toby B
        Hi Smiffy,

        Is this an attribute drop down list generated from Actinic or are you hard coding it within a template?
        What I was originally trying to do was to use the CUSTOMVAR within the "HTML for Name" part of a Choice Details box.

        The customvar would simply be a text field of "£9.99" - what I had put in the HTML for Name was Item price = CUSTOMVAR:PRICE

        but that didn't seem to work.

        Comment


          #5
          Customvar's won't work when embedded in user typed text. They have to go into Templates.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X