Announcement

Collapse
No announcement yet.

Dealing with # in part number

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

    Dealing with # in part number

    Hi,

    As a supplier of computer systems, we regularly deal with HP/Compaq equipment
    Most of the part numbers from HP include a # in their part number
    i.e: EU375ET#ABU for instance.

    This is fine when dealing with the stock side of things, but when it comes to
    using this reference with the image, it seems that Actinic or jpg images cannot deal with anything of this nature.

    If i remove the hash - so the image reference becomes EU375ETABU, the image will be displayed, but then if the item is a new product (hence listed in the new product section on the site) clicking on "find out more" returns the following statement:

    "The specified product reference (EU375ETABU) couldn't be found.

    Please wait for your browser to forward you to the next page or click here."

    I presume this is because the database cannot relate to the change in part number/product reference?

    Is there any way round this problem?
    HP are obviously a major player in the computer industry, and well respected when it comes to corporate customers looking for desktop equipment - if i can't get this to work, then we will have to exclude the range from our store (something i'm sure the MD won't be happy with!)

    Appreciate any thought on how this can be accomplished!

    Best regards
    www.elitex.co.uk - Computer hardware, peripherals and components.

    #2
    Are you sure this isn't a caching problem?

    Changing a product's reference should change it everywhere. Try refreshing the page before using the "find out more" link.

    As to the # being invalid. This does seem to trip up Actinic. You can use the # character in a Windows file-name but it doesn't seem to be valid in any web-page - not just Acinig generated ones.

    Actinic should really warn you that this is an invalid file-name. Note that many other characters are invalid in file names e.g. : / ? |. And actinic also limits you from using certain characters in your product references e.g. ! _. You just have to work within these limitations.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Sorry Norman (and thanks again to you for the response so quickly!)

      I should have pointed out that i am leaving the product reference (with the hash) as it is, because the csv file i am importing with stock levels contains the # within the product code. - this then allows me to import the current stock levels.

      What i should have said was that the jpg images can't for some reason contain a # within the filename as they don't display anything (other than the little red "x" in the top right hand corner of the space where the picture should be)
      If i remove the #for purposes of displaying the image, then Actinic is unable to locate the product if "click for more" is clicked on.

      So it's obviously a cross reference type of problem.

      Confused? - me too!
      www.elitex.co.uk - Computer hardware, peripherals and components.

      Comment


        #4
        As always, the URL of a faulty page and a note of the faulty product would help a lot.

        The image filename and product reference do not have to be related to each other in any way. I cannot see how altering the image can break the product (other than not displaying said image).
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Hi norman,

          Give me 5 minutes to add a new product to the site, and i can show you what is happening.
          I'll post the URL - should have done that before!! - apologies.
          www.elitex.co.uk - Computer hardware, peripherals and components.

          Comment


            #6
            Ok,

            I've added a HP desktop pc as an example.

            This is listed on the left hand side of the website under new products as "Business Desktop DX2200"

            You can see the image of the item - this has been called "EU375ET.jpg" as jpg images can't it seems handle # in the filename.

            However, the product reference (as in the csv file i need to import) is called EU375ET#ABU (as the manufacturer's part number - and directly relates to the csv stock levels/part number)

            If you click on "find out more" (coloured red) - then i get the following message : "specified product reference (EU375ET) couldn't be found.

            Please wait for your browser to forward you to the next page or click here."

            The url for the main page is: http://www.elitex.co.uk/index.html

            For the product within the catalogue, it is: http://www.elitex.co.uk/acatalog/HP_PC_s.html
            (It's currently the only one listed, purely to test this)

            The url for the link as a new product for this item is: http://cgi.www.elitex.co.uk/cgi-bin/...470B&NOLOGIN=1

            There may be some relation to the cgi bin perhaps? - just wndered.

            See what you get and let me know when convenient! (given the time of evening)

            Best regards
            www.elitex.co.uk - Computer hardware, peripherals and components.

            Comment


              #7
              OK. I see this. It's an Actinic bug. Actinic should be URL encoding the product reference when it's used in such links and it isn't.

              I'll raise this as a separate bug report.

              Luckily we have so much control in V8 that we can fix this ourselves.

              The line in the Mini New Products Item layout that generates the link is
              Code:
                    <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:variable name="ProductReference" />&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">find out more</a></p>
              and we can replace it with

              Code:
                    <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:block php="true">echo urlencode('<actinic:variable name="ProductReference" encoding="perl" selectable="false" />');</actinic:block>&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">find out more</a></p>
              This just fixes the New Products list and will need repeated elsewhere that such links are used.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Wow!

                How do you manage to figure that out so quickly!
                (I'm no coder, and have very little knowledge of this sort of thing) - I applaud you [Big grin]

                I'll be changing the code to this tomorrow!

                I suppose it doesn't help if you're sat here trying to fathom things out after a few cans of lager hehe!

                Once again, thanks for your efforts to help very much appreciated.

                Enjoy what is left of the early morning!!

                Regards
                Troy
                www.elitex.co.uk - Computer hardware, peripherals and components.

                Comment

                Working...
                X