Announcement

Collapse
No announcement yet.

Blockif Help for Section page and cart error

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

    Blockif Help for Section page and cart error

    If I add a product to the cart, with zero quantity, the 'same page' is returned via the cgi-bin with the standard error:

    No products have been added to the shopping cart. Please enter the quantity of each product being ordered before pressing the 'Add to cart' button.
    The pagetype for both the standard html page and the page returned by the cart shows as "Section".

    Is there anyway to differentiate between these to pages, other than a Perl hack, so I can follow the logic of:

    If its a normal section page DO THIS, else if its cgi-bin generated page DO THAT.

    The reason why I want to be able to do this is that on some pages we generate <?php ?> code. This breaks when the section page is reproduced via the cgi-bin through a perl script.

    #2
    Blockifs only run on the desktop, they have already been processed by the time the site is uploaded, therefore not available to use online at all.

    Comment


      #3
      Have you tried setting min quantity to 1 and having quantity on product page


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        Its a page with multiple products on, so setting them all to 1 is not an option.

        I understand that blockifs are generated at desktop, and so I wanted to know if there was a way to differentiate between the standard section page with products on it and the cgi-generated one.

        All other pages generated via the cgi-bin have their own specific pagetype, e.g. "Shopping Cart", "Checkout Page 0", etc. If the pagetype had been called, say "Zero Quantity Error Page" or something similar, then I could use this.

        So I was wondering if there was another actinic variable I could use to distinguish between the two pages.

        Alternatively, is there a perl hack that could be used to strip out code between, and including, "<?php" and "?>" ?

        Comment


          #5
          A workaround I have tested is to use a javascript call to a php page, which will allow server side PHP to be used via pages generated through perl.

          Essentially, this looks like:

          Code:
          <script type="text/javascript" src="includes/myphpscript.php?myvar=var1&amp;myvar2=var2"></script>
          Although this is a workaround, it comes with latency and slows the page load down, especially where you are using a number of these calls throughout a page.

          Comment


            #6
            Thinking aloud can you go back to the root cause and inhibit the ability to add a zero quantity to cart instead.

            Comment


              #7
              No, there are several product options per page and the user must submit a whole number of 1 or more before submitting, otherwise an error is returned. Actinic is behaving correctly in this respect, its just that I want to include some server side PHP and push the envelope

              Comment

              Working...
              X