I just set up my first opencart installation, and everything seems to work just fine, except for some minor detail — I cannot add anything to the cart...
It doesn't matter if I do it from a listings page or from the individual product page, once I click the "add to cart" button, there's a little delay (and "Loading" might flash on the button or the cart status), and then it goes back. No error message on the screen or in the log (php error logging is enabled).
I modified some of the template to hide certain elements (e.g. the model and price lines), but that was mainly on the product page, so I don't know if that would affect the cart function on the listing pages.
The site is here: http://popcorncafe.ca/shop
(All the configurations are done without the www prefix, so that is probably not the culprit.)
It doesn't matter if I do it from a listings page or from the individual product page, once I click the "add to cart" button, there's a little delay (and "Loading" might flash on the button or the cart status), and then it goes back. No error message on the screen or in the log (php error logging is enabled).
I modified some of the template to hide certain elements (e.g. the model and price lines), but that was mainly on the product page, so I don't know if that would affect the cart function on the listing pages.
The site is here: http://popcorncafe.ca/shop
(All the configurations are done without the www prefix, so that is probably not the culprit.)
I can see the site has been modded slightly (no search box)
You should re-upload the default files as there is no bug wit hthe add to cart function by default.
You should re-upload the default files as there is no bug wit hthe add to cart function by default.
Commented out price : NOT OK -> causes div id product beiing commented out and as a result data is not send with button-cart click function.Frescard wrote: I modified some of the template to hide certain elements (e.g. the model and price lines)
Code: Select all
<?php if ($price) { ?>
<ul class="list-unstyled">
<!--
<?php if (!$special) { ?>
<li>
<h2><?php echo $price; ?></h2>
</li>
<?php } else { ?>
<li><span style="text-decoration: line-through;"><?php echo $price; ?></span></li>
<li>
<h2><?php echo $special; ?></h2>
</li>
-->
<?php } ?>
<?php if ($tax) { ?>
<li><?php echo $text_tax; ?> <?php echo $tax; ?></li>
<?php } ?>
<?php if ($points) { ?>
<li><?php echo $text_points; ?> <?php echo $points; ?></li>
<?php } ?>
<?php if ($discounts) { ?>
<li>
<hr>
</li>
<?php foreach ($discounts as $discount) { ?>
<li><?php echo $discount['quantity']; ?><?php echo $text_discount; ?><?php echo $discount['price']; ?></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
Then price is commented out, special or not.
But tax, points and discounts will be visible.
Because of https://en.wikipedia.org/wiki/Same-origin_policy, you should use one type url only www or non-www.Frescard wrote:I just set up my first opencart installation, and everything seems to work just fine, except for some minor detail — I cannot add anything to the cart...
It doesn't matter if I do it from a listings page or from the individual product page, once I click the "add to cart" button, there's a little delay (and "Loading" might flash on the button or the cart status), and then it goes back. No error message on the screen or in the log (php error logging is enabled).
I modified some of the template to hide certain elements (e.g. the model and price lines), but that was mainly on the product page, so I don't know if that would affect the cart function on the listing pages.
The site is here: http://popcorncafe.ca/shop
(All the configurations are done without the www prefix, so that is probably not the culprit.)
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
Thanks for the hint! I've modified it per your suggestions, and it now works.pprmkr wrote: Move --> 1 line lower after <?php } ?>
But it seemed to have been more an issue of unbalanced brackets than a commented-out price, no?
Because once I move the comment-close tag, the price is still invisible, but the cart-adding works fine now.
Who is online
Users browsing this forum: No registered users and 38 guests