Problems, need help? Have a tip or advice? Post it here.
15 posts Page 2 of 2
@KK Sir,

I injected my code (alongwith JS) into the simple-couchified.zip's index.php code. :?:

The cart still functions and the cart-modal.php gets executed. There is no JS issue there.

After additions the index.php of cart is similar to my product.php, especially in terms of the JS.
Image
where innovation meets technology
So I take that your JS code works in the sample CouchCart template.
That is good as it gives us a baseline to compare against.

Keep adding your template's code to the working sample with the final goal of making the two identical. At some point the bug will be inserted into the second template and you'll know what is going wrong.

That is debugging at its basic ;)
Sir finally found my mistake.

The AJAX call as I was thinking was not being triggered. And hence the problem.

The cart-modal.js has the following code
Code: Select all
$(document).ready(function() {
    // Handle 'Add Item' & 'Update Cart' form submissions
   $(document).on('submit', [qoute]'.cart-form'[/quote], function(event) {
      event.preventDefault();
        if ($('#cart-modal').is(':hidden')) {
            $('#cart-modal').modal('show');
        }


To invoke the cart-modal.php, we need to be able to call the class .cart-form (as quoted above). And to invoke the call, I needed to add the class to my code at:

Code: Select all
<cms:pp_product_form class="cart-form">

:oops: Which earlier I had not done.

So if there is this problem of the cart-modal.php not showing again, I guess I will have to double check if my pp_product_form contains the cart-form class or not!!!

PROBLEM SOLVED!!!
Image
where innovation meets technology
KK wrote: That is debugging at its basic ;)


Just love doing that... Now I can have a peaceful mind and a stroll before I sit for the next project work...

I really see that, that was a very silly mistake on my part!!! :lol:
Image
where innovation meets technology
:D
15 posts Page 2 of 2