user2018 Developer Από Italy Μέλος από Οκτ 2015 user2018 19 Νοε 2015 22:04 I put a checkbox called personalization in the box_product:
litecart Main Crew Από Sweden Μέλος από Φεβ 2013 litecart 23 Νοε 2015 01:03 The only thing worth noting regarding posting is if you use http post protection then a ticket is provided with form_draw_form_begin() that is required to submit a post. But I don't think that is your problem here.
insanebear Developer Από Poland Μέλος από Οκτ 2014 insanebear 23 Νοε 2015 13:46 I think that you can try to do this at this point: $('body').on('submit', 'form[name=buy_now_form]', function(e) { (...)
litecart Main Crew Από Sweden Μέλος από Φεβ 2013 litecart 25 Νοε 2015 04:15 jQuery on() is necessary for placing events in any ajax retrieved content that is not available at first page load.
insanebear Developer Από Poland Μέλος από Οκτ 2014 insanebear 25 Νοε 2015 08:51 Yes, but you don't need this on page load (or i don't understand question :P). You can pass your personalisation data here: (...) data: { 'data': $(form).serialize() + '&add_cart_product=true', 'personalisation' : ... }, (...) ...and in pages/ajax/cart.json.inc.php save it to session or something ;) Second thought: Catalog -> Option groups -> Create new group (Name: Personalisation, Type: textarea) Hide "Peronalisation" container with something like this: $('textarea[name=options[Personalization]]').parent('.options').css('display', 'none'); Now: Personalise Further: $("input[name=blabla]").click(function() { if (this.checked == true) { $($('textarea[name=options[Personalization]]').parent('.options')).slideDown(); $('textarea[name=options[Personalization]]').prop('required', 'required'); } else { $($('textarea[name=options[Personalization]]').parent('.options')).slideUp(); $('textarea[name=options[Personalization]]').removeProp('required'); } });