Announcement

Collapse
No announcement yet.

slightly strange geeky perl question

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

  • slightly strange geeky perl question

    Don't ask why I'm asking but does anybody know what the effect of not calling the ValidateOrderDetails subroutine in perl scripts to do with the cart and instead doing

    my ($Status, $Message, $pFailures) = ( $::SUCCESS , '' , {} );

    is?

    Thanks

  • #2
    Cart would work but customer would be able to use invalid quantities, missing other info and date prompts, etc.

    Customer would even be able to cheat you by ordering negative quantities of something and reducing the total due.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


    • #3
      Originally posted by NormanRouxel View Post
      Cart would work but customer would be able to use invalid quantities, missing other info and date prompts, etc.

      Customer would even be able to cheat you by ordering negative quantities of something and reducing the total due.

      It doesn't seem to be quite that straightforward. There is some other error checking that ultimately stops a customer ordering a number between 1 and 32767 or 10 and 32767 for things that have a minimum of 10. It's even clever enough to let you add 9 to a cart that already has 10 of the same product in. I don't think there are any other places a customer could put invalid information.

      Before the subroutine was bypassed the cart was slow on some servers.

      Thanks anyway

      If it's still sparking your interest (as it was mine) Iet me know and I can PM more info.

      Comment


      • #4
        I'm not guessing re negative quantities. I did it. I edited a test site's ActinicOrder.pm to make sub ValidateOrderDetails immediately do return $::SUCCESS.

        I uploaded the site and was able to order -1 of the Three Diamond Ring and download an order with total -24.00. See attached.
        Attached Files
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X