I
I
Islam Ibakaev2018-02-14 03:04:00
CMS
Islam Ibakaev, 2018-02-14 03:04:00

How to get the $cart variable from cart.html to index.html in shop-script 7?

I am making a balloon shop using the shop-script engine. Yesterday, the customer suddenly wanted the cart to be displayed on the main page, that is, there was no transition to /cart.
When clicking on the cart icon, a block is now extended, which should contain thumbnails of the goods placed in the cart (there is an example of how the thumbnail should look like).
I see only one solution to this problem, namely: to bypass $cart.items in this block, and for this you need to access the $cart variable in the index.html template. Can you tell me
how to achieve this? And if not, then what (what) other options are there to solve this situation? Is it possible to get json data of the goods in the order with an ajax request? Perhaps there is a plugin for a similar task?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Islam Ibakaev, 2018-02-14
@devellopah

in general, understood. decision -{$wa->shop->cart->items()}

D
danforth, 2018-02-14
@danforth

{$wa->shop->cart()}
But I advise you to dissuade your customer from this venture.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question