G
G
GalileoGalileu2020-05-27 23:47:55
MODX
GalileoGalileu, 2020-05-27 23:47:55

Good afternoon! Question about MiniShop2. The cart does not add a product and I don't know why. Can you help?

Cart and minicart added

<div class="{$total_count > 0 ? 'full' : ''}" data-toggle="dropdown" href="" id="msMiniCart">
    
    <div class="empty">
        <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                    <i class="fa fa-shopping-cart"></i>
                    <span>{'ms2_minicart' | lexicon}</span>
                    <div class="qty">0</div>
                  </a>
    </div>
    <div class="not_empty">
        <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                    <i class="fa fa-shopping-cart"></i>
                    <span>{'ms2_minicart' | lexicon}</span>
                    <div class="qty">{$total_count}</div>
                  </a>
    </div>
</div>
<ul class="ajax-data">
  
</ul>


But when you click on the "Add to Cart" button (the code of which is below), nothing happens ...
<div class="add-to-cart">
  <div class="qty-label">
    Колличество
  <div class="input-number">
  <input type="number" value="1">
  <span class="qty-up">+</span>
<span class="qty-down">-</span>
</div>
</div>
<button type="submit" class="ms2_product" name="ms2_action" value="cart/add" style="margin-left:10px; position:relative;"><i class="fa fa-shopping-cart" aria-hidden="true"></i>ms2_frontend_add_to_cart</button>
              </div>

Looked at a lot of answers to similar questions, but nothing
And so! What's broken here?
How does the shopping cart work in Modx?
Maybe you need some kind of script that sends the goods to the cart?
I did not try to do this only because I do not think that ms2 did not provide for this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-05-28
@DcFanoiD

The mini-cart chunk output must be uncached.

S
sasha_pe, 2020-06-01
@sasha_pe

As an option, check which version of jquery is connected and how much jquery is on the page, if there are any conflicts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question