Announcement

Collapse
No announcement yet.

Serious bug: Same page Duplicates and Single Cart fail.

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

    Serious bug: Same page Duplicates and Single Cart fail.

    Using 8.0.3 GLCA production release.

    Scenario: Create a product and then make a duplicate or duplicates of it below on the same page. Now set page to use Single Add to Cart. Publish page.

    Look at live page. Now select main product quantity as say 2, leave last of the duplicates at quantity 0. Try Add Selection to Cart. You get error bounce page saying that No products have been selected.... If you set all the values only the last one gets added to the cart. Likewise, if you have Choices and make different choices on each product, only the last one gets used.

    Reason: Actinic is using <actinic:variable name="ProductReference" /> as the reference data for all the product fields, including the variant selectors and product quantity. This variable is always that of the main product and contains no duplicate identities. Consequently the page contains lots of form fields with identical names. The only fields that are unique in these products and correctly contain the duplicate ID seem to be the CartError and EncodedProductAnchor variables.

    Hack/Solution: If instead of
    Code:
    <input type="text" name="Q_<Actinic:Variable Name="ProductReference"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />
    I use
    Code:
    <input type="text" name="Q_<actinic:block php="true">$dupindex = <actinic:variable name="DuplicateIndex" encoding="perl" selectable="false" />; if ($dupindex > 0) echo "$dupindex!";</actinic:block><Actinic:Variable Name="ProductReference"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />
    then that fixes the Product Quantity. However this would need doing for all prompts and variants, etc. Quite a lot of hacking.

    Notes: Actinic V7 correctly used 1!<prodref>, 2!<prodref> when generating variant selectors, quantites, etc.

    In case anyone says "why would you want duplicates on the same page" the answers are (a) you're not prohibited from doing this; and (b) you might want several dups all with Attributes and Choices to allow the customer to select different quantities of each Choice all in one go; which is a very desirable feature.

    PS I'm sure I reported this way back in Alpha days (I tend to look at the generated code more than most).
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    I would definately want to use duplicates on the same page,

    earlier tonight, I asked for the LinkedProductName - the reason I wanted this was so that I could have a single page with the main product at the top, then do some fancy formatting with fragments, add 2-3 pictures, some more text (you get the idea) and finally add a duplicate product and hide lots of things except the Related-Products
    this has allowed me to move the related products way down the page but still have a further pile of fragments for even more text and pictures. There seems no easy way to move your related products in the middle of your text blocks.

    I'm sure its only a matter of time before I want other parts down the page including quantities etc etc.

    (by the way, I've just re-read the posting from Norman as I write this, and its an interesting way of getting the user to select different quantities of each Choice all in one go - like norman says " a very desirable feature " and one that I'll probably use as well - I can see the need brewing as we speak.

    Comment


      #3
      Re' solutions / hacks. This is a problematic one. If one changes the ProductReference variable to include the duplicate ID, then that will probably fix more things than it breaks - but some will break. E.g. the displayable Product Reference will have to switch to using the ProductRef variable instead. However the alternative ProductRef variable seems to generate {19} on all products when I test it so I guess that's broken too.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Norman

        Thanks for reporting this. I have passed it onto the team.

        It must have slipped through the net back in the alpha testing period, so I have re-registered the bug.

        Comment

        Working...
        X