Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hi,
I have a problem with shopping cart that I cannot pass :(
i have a product page similar with the page "blog.php" from the Portfolio Site tutorial. The "Add to cart" button is within it.

The problem is that the pop-up cart doesn't work if i have the following lines on my page:
<cms:if k_is_page>
........................................................
<cms:else />
<cms:embed 'inele-list.html' />
</cms:if>

If i remove these line everything works fine.
Do you have any idea what the problem is?

Florentina
Mentioned lines bring no harm and are correct. There can be a whole lot of broken things in the hidden part and embedded snippet. Care to share?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi,
thank you for your feedback!
My problem is with AJAXifying the cart ...
The shopping cart works fine without this part.
This is my product page: http://e-san.ro/in-constructie/inele.php?p=27 (inele.php)
You can find in the attachement the other pages involved.

If i remove the code below the shopping cart works but i don't have the pop-up window :(

<div id="cart-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-body"></div>
<button class="modal-close" data-dismiss="modal" title="Close">&times;</button>
<img src="images/ajax-loader.gif" class="ajax-loader" width="32" height="32" alt="Loading...">
</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">
// Set global values for 'js/cart-modal.js' that follows
var cart_link = "<cms:link "<cms:pp_config 'tpl_ajax_cart' />" />";
var checkout_link = "<cms:pp_checkout_link />";
</script>
<script src="js/cart-modal.js" type="text/javascript"></script>
<script src="js/input-restriction.js" type="text/javascript"></script>

Attachments

The code you published is the code for popup modal window. Removing code effectively disables it.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
yes, i figured that out, but i don't understand what is the problem with the popup modal window.
If you check the link i mentioned, you can see that the popup windows appears in loading faze for a few seconds and after that i get a blank page ...
If i check the cart page, the product is there.
what can be wrong?
Please do a view-source of your template and try to locate the code generated by the Couch code below
<script type="text/javascript">
// Set global values for 'js/cart-modal.js' that follows
var cart_link = "<cms:link "<cms:pp_config 'tpl_ajax_cart' />" />";
var checkout_link = "<cms:pp_checkout_link />";
</script>

We are interested in the highlighted line above. It should show you the name of the template you want to show within the popup (check your cart config file to make sure you have put the right name).

I suspect you'll find that value empty.
That would mean that you have failed to register the popup template. Please do so by visiting that template as super-admin. All registered templates show up in the admin-panel's sidebar. Please make sure you can see the popup template listed in the sidebar.

Hope it helps.
omg ... i can't believe it :lol:
what a waste of time ...

everything was correct, i forget to do a very small and important thing, to visit
http://e-san.ro/in-constructie/cart-modal.php to activate de cart-modal.php in admin.

Thank you very much for the help! you are awesome on support!
7 posts Page 1 of 1