Announcement

Collapse
No announcement yet.

Variable Text Format Change

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

    Variable Text Format Change

    I have a varable set up for "availability" for product properties to show "in stock", "out of stock" and "preorder" as per Google preferred terms.
    Has anyone any suggestions on how I could change the format of the text say just to make the "out of stock" variable display more prominently in red text and white highlight?
    Martin
    Mantra Audio
    Martin
    Mantra Audio

    #2
    If you double click on the variable name in the layout you can give it some basic styling there or you can add a CSS class
    Elysium:Online - Official Accredited SellerDeck Partner
    SellerDeck Design, Build, Hosting & Promotion
    Based in rural Northants

    Comment


      #3
      Originally posted by Goz View Post
      If you double click on the variable name in the layout you can give it some basic styling there or you can add a CSS class
      I see that I can change the basic styling in the variable layout i.e. font size, colour, weight etc. but this applies to all values within the varaible not just the one value I was seeking to emphasise.
      When I tried changing the appearance of a product property variable value within the design variable layout from lower case to upper case text then the variable values for all products reverted to the default value so I had to re-instate the snapshot backup.
      Is there a way round this?
      I can view the variable values in the google datafeed .xml file but are these also stored in a table in the Catalog database?
      This would make it easier to re-enter the non-default variable values instead of having to do it for affected products one at a time.
      They do not exist in the Product table.

      Martin
      Mantra Audio
      Last edited by Mantra; 25-Oct-2018, 05:49 AM.
      Martin
      Mantra Audio

      Comment


        #4
        my knowledge on this is basic, so what I know is blockif'...

        Is it possible to have two lines
        line 1 to show "in stock" / "preorder", and block the "out of stock"
        line 2 to show "out of stock" and block the "in stock" / "pre-order"

        and somehow have different formatting on either lines?

        Comment


          #5
          Assuming your variable is called "Availability" and it uses "out of stock" for the setting you want highlighted, then try:
          Code:
          Availability: <span <actinic:block if="%3cactinic%3avariable%20name%3d%22Availability%22%20%2f%3e%20%3d%3d%20%22out%20of%20stock%22" >class="actwarningcolor"</actinic:block>><actinic:variable name="Availability" /></span>
          This puts a span around the stock availability text and adds class="actwarningcolor" for the out of stock entries.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thank you Norman
            The variable is called "availability" - does the lack of initial capital make a difference?
            The variable does use "out of stock" for the setting I would like highlighted.
            How does class="actwarningcolour" pick out "out of stock" entries?
            Do I need to add CSS code for ".actwarningcolor {.....} to the stylesheet?
            Martin
            Martin
            Mantra Audio

            Comment


              #7
              It would have been quicker to try the bit of code I posted than to write all these questions. So try it and see!
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Originally posted by NormanRouxel View Post
                It would have been quicker to try the bit of code I posted than to write all these questions. So try it and see!
                I did try it but could not see the difference because I had already set the variable to display in red text - doh!

                I have tried it again today with the variable set to display black text and can now see that your code displays the "out of stock" product availability in red text and the "in stock" product availability in the black text as if by magic and that the size, style etc. can still be set within the variable.

                Thank you very much for this.

                BTW your tabber, featured products and holiday warning add ons are working absolutely fine.

                Rgds
                Martin
                Martin
                Mantra Audio

                Comment


                  #9
                  Glad it works. It did here too when I tested it. If I post untested code or pseudo code I always say so.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment

                  Working...
                  X