Add to Cart button doesn't work

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue May 20, 2014 5:50 am
Reply with quote
Report this post
Hi,

We plan to start a online shop. We're using Joomla 2.5.20, VM 2.6.0a, and StoreBox 3.11 with dummy data here:
http://qualifi.com.au/shop/blouses-shirts/t2-detail

Actually this is fresh installation. Everything seems fine to me except "Add to Cart" button. For example in:
http://qualifi.com.au/shop/blouses-shirts/t2-detail

In Chrome Inspection it shows some errors:
Uncaught SyntaxError: Unexpected token ; t2-detail:386
Attr.specified is deprecated. Its value is always true. jquery.min.js:2
GET http://qualifi.com.au/shop/index.php?op ... 1&view=pro…%255D%3D1%26virtuemart_product_id%255B%255D%3D18%26option%3Dcom_virtuemart 500 (Internal Server Error)

Could you please help us?

Cheers,
User avatar
Fresh Boarder

GK User
Tue May 20, 2014 6:47 am
Reply with quote
Report this post
This is a bug in newest quickstart template.
I'll provide a fix as soon as I get an answer from our devteam.
User avatar
Moderator

GK User
Tue May 20, 2014 11:07 am
Reply with quote
Report this post
From what I see this error doesn't break anything. It's source is probably VM itself. Please check on default Beeze template if it shows also.
User avatar
Moderator

GK User
Wed May 21, 2014 1:42 am
Reply with quote
Report this post
Hi,

Thanks for the prompt reply.

I changed the shopfront template to Atomic - default and when the page for example:
http://qualifi.com.au/shop/blouses-shirts/t2-detail

load I still get this error in Chrome inspection:
Uncaught SyntaxError: Unexpected token ; t2-detail:186
GET http://qualifi.com.au/shop/index.php?op ... 1&view=pro…%255D%3D1%26virtuemart_product_id%255B%255D%3D18%26option%3Dcom_virtuemart 500 (Internal Server Error)

However, When I clicked on "Add to Cart", the product is added to the cart and I can see it when I click on Show cart.

Cheers,
User avatar
Fresh Boarder

GK User
Wed May 21, 2014 1:54 am
Reply with quote
Report this post
Hi again,

I'm sorry. But it's working now when I changed the template back to StoreBox template!
User avatar
Fresh Boarder

GK User
Wed May 21, 2014 7:11 am
Reply with quote
Report this post
Hmm.... strange.
User avatar
Moderator

GK User
Wed May 28, 2014 4:44 pm
Reply with quote
Report this post
The problem is caused by original VM code - we have it copied to:
template/html/com-virtuemart/productdetails/default.php
this code:
Code: Select all
<script type="text/javascript">
        function check(obj) {
        // use the modulus operator '%' to see if there is a remainder
        remainder=obj.value % <?php echo $step?>;
        quantity=obj.value;
        if (remainder  != 0) {
            alert('<?php echo $alert?>!');
            obj.value = quantity-remainder;
            return false;
            }
        return true;
        }
</script>

needs to be replaced by:
Code: Select all
<script type="text/javascript">
        function check(obj) {
        // use the modulus operator '%' to see if there is a remainder
        remainder=obj.value % parseInt('<?php echo $step; ?>', 10);
        quantity=obj.value;
        if (remainder  != 0) {
            alert('<?php echo $alert?>!');
            obj.value = quantity-remainder;
            return false;
            }
        return true;
        }
</script>
User avatar
Moderator


cron