Announcement

Collapse
No announcement yet.

a freebie: recently viewed items.

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

    #61
    Hi

    Did anybody find a way to stop the - being displayed as 45 when part of the product name?

    Comment


      #62
      Originally posted by gabrielcrowe View Post
      proNAME = temp.replace(/[^a-zA-Z 0-9]+/g,'');
      The problem is caused by the above line in Gabes code which will remove the extra characters used in HTML to code non alphanumeric characters but not the 4 & 5 which are part of the code e.g. & # 4 5 ; is the code for - and results in 45 being left in the name. Adding &, # and ; to the line should cure your problem but may introduce other problems, which Gabe was trying to sort out.

      Malcolm

      SellerDeck Accredited Partner,
      SellerDeck 2016 Extensions, and
      Custom Packages

      Comment


        #63
        Originally posted by purple View Post
        Did anybody find a way to stop the - being displayed as 45 when part of the product name?
        Let me put it this way: if you're using Actinic layouts with many products on one page, this script will do you no good as it would just fill in the recently viewed item slots with first four products form the particular category. If you have a separate html page for each product (section - subsection) you can remove the Product Name from your layout and leave just the Subsection Name. You can use the dashes and quotes in Subsection Name. This gives you a better choice of product naming. You can get rid of all dashes, quotes and other special characters. As other guys said, adding & and # to the list, will produce other unwanted problems.

        Originally posted by mattc View Post
        Finally, it a bit messy how the images dont keep their aspect ratio. can this be fixed easily?
        Just removing the height won't do the job. This looks like working good for me:
        Code:
        .recently img {text-decoration:none;width:75px;height:50%;}
        Gabriel, many thanks for the code!
        Eco-Friendly House

        Comment


          #64
          congrats those that sorted it out. if possible if you ahve working version, could you please post it here for people to share.

          also, about your vesion, can we see it in action? got a nice link?

          Comment


            #65
            Just thought I should let people know that I have added this mod to our website, took a bit of work, but works well.

            Has being running for a week or so and I not aware of any problems.

            Thanks to Gabe for original post.
            Jethro

            TridentUK.com, the yacht and dinghy shop on the web

            Comment


              #66
              Originally posted by purple View Post
              Hi

              Did anybody find a way to stop the - being displayed as 45 when part of the product name?
              I know this was a long time ago, I'm just so chuffed I managed to get this working!

              I've replaced this line of code

              Code:
              proNAME = temp.replace(/[^a-zA-Z 0-9]+/g,'');
              With this one

              Code:
              proNAME = temp.replace(/\[^a-zA-Z 0-9 \. \+ \( \)&-]+/g,'');
              This also allows for the following characters in product names

              / [ . + ( ) & - ]

              Have a looky on my site

              OnlyRugged

              I know the aspect ratio needs sorting out yet, but yay me!

              Btw, my cookies are set on the extended info pages, so needed a bit more tweaking from gabe's original code. I replaced

              Code:
              proIMAGE='<actinic:variable name="ProductImageFileName" />';
              with

              Code:
              proIMAGE='<actinic:variable name="ExtendedInfoImage" />';
              There may be an easier way of doing this, I'm not sure tbh, I just hope this helps someone else!
              Need a barcode label or card printer? Look no further than OnlyZebra.

              Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

              Comment


                #67
                Hi, I put this on our site, but found that it works fine without replacing any characters and just using the product name.

                Please check it yourself, but I have tested across all main browsers and it seams to be fine on our site. See www.tridentuk.com
                Jethro

                TridentUK.com, the yacht and dinghy shop on the web

                Comment


                  #68
                  Just had a quick look around your site jethro, looks good. You don't seem to have many items with special characters in their names though, the odd dash and full stop here and there but that's about it.

                  Ours have slashes and ampersands and brackets and all sorts, and instead of the character, the product name in the 'recently viewed items' box was something like "DL%46KYMAN %91something %93" etc. Obviously this wouldn't look good to the customer so I did the above and it sorted it
                  Need a barcode label or card printer? Look no further than OnlyZebra.

                  Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

                  Comment


                    #69
                    Hi, I was meaning that I left out the following line

                    HTML Code:
                    var temp = new String('<Actinic:Variable Name="ProductName"/>');
                    And changed the line after it to;

                    HTML Code:
                    proNAME = new String('<actinic:variable name="ProductName" />');
                    This seams to work for us and special characters work ok. I can't remember the logic behind it.

                    The product below once viewed shows some of the special characters correctly. Although we don't use many we do use ( ) , + - / " '

                    http://www.tridentuk.com/sailing/pro...ide-OT463.html

                    Don't know if that will help.
                    Jethro

                    TridentUK.com, the yacht and dinghy shop on the web

                    Comment


                      #70
                      Ah right, gotcha! That makes sense.

                      There must've been a reason gabe did it that way though. Gabe?

                      Edit: And this is the point I remember Gabe borrowed () this code and got it working for Actinic, may be he just missed this? Dunno lol
                      Need a barcode label or card printer? Look no further than OnlyZebra.

                      Thinking about barcode scanning and whether it could improve your business' efficiency? We can offer a range of products from numerous manufacturers. OnlyAML, OnlyIntermec, OnlyLXE, OnlyOpticon & OnlyPsion or OnlyRugged, the one stop shop for all your needs.

                      Comment

                      Working...
                      X