Cannot add Gift Certificate to Cart with custom fields


  • Default avatar
    edvard    
     6 years ago
    0

    Hello, I have 3 custom fields in our gift certificate, when I test on localhost everything is OK, but when live I cannot add gift certificate to cart. If I disable custom fields, everything is OK. Can you please check?

    Thanks

  • Your avatar
    seyi    
     6 years ago
    0

    Hi,

    Just did a test and it seems to work

    ZyWlcqR.png
  • Default avatar
    edvard    
     6 years ago
    0

    strange... for me it does not work, just tried it again on chrome and firefox

    what else I can try?

  • Your avatar
    seyi    
     6 years ago
    0

    It works, but it takes time.  Looking at firebug, for every letter typed, it runs 2 ajax commands to this url:
      index.php?option=com_virtuemart&view=productdetails&task=recalculate&format=json&nosef=1&lang=en

    So in my text, typing email, message, and name, that is 16 letters, and 32 ajax calls to the above url.  Only after all those calls have finished running does it then add the product to the cart.  So somehow have to get the ajax calls to stop running,  you do not need to recalculate the price on every letter entered.  Not sure how to fix, might be in the template, or maybe in the setup, did you select a charge for every letter in the product setup or something?
  • Default avatar
    edvard    
     6 years ago  last edited 6 years ago
    0

    thanks, it is probably something with the template as when I change the Layout position from "addtocart" to "ontop" it adds to cart without problem really fast, but custom fields are missing in the cart. I will check the template and reply back



    Now it works. As I do not need the option to recalculate the price based on custom text fields, I had to override the plugin textinput, deleted the lines from 16 to 28 from default.php which are //javascript to update price... thank you for your help and prompt reply