Problems, need help? Have a tip or advice? Post it here.
13 posts Page 2 of 2
See, the problem is that the form is not being submitted (k_submitted is not set).
One of the JS files is somehow hindering that and we'll have to pin-point which exactly.

If your test site happens to be online, please send me the link and I'll see if something could be found.
Else, save 'complete page' (one where the form is working and another where it is not) and PM them to me. Maybe we can find something there.
Hi KK,

I've resolved it now - I was actually trying conditionals as you replied - this seems to work fine:

Code: Select all
   
<cms:if k_template_name !='checkout.php' >
<script src="assets/js/cart-modal.js" type="text/javascript"></script>
</cms:if>


Am I right in thinking something in cart-modal.js hijacks the continue to PayPal link? and it should never be included on the checkout.php page?
Am I right in thinking something in cart-modal.js hijacks the continue to PayPal link? and it should never be included on the checkout.php page?

The relevant code in cart-modal.js is this -
Code: Select all
$(document).on('click', '.checkout-button', function(e) { ..

As can be seen, it'll hook the click event of element having class 'checkout-button'.
This, as it happens, is also the class of the PayPal button
<cms:input name="paypal" class="button checkout-button" type="submit" value="Continue to PayPal" />

and hence the problem.

In any case, the cart-modal.js was meant to be included only on templates that show the Ajax pop-up cart. Including it on any other template will serve nothing. So, yes, you are right - it should never be included on the checkout.php page.
13 posts Page 2 of 2
cron