Minishop2 корзина

Здравствуйте

Простите меня за плохой русский, я из Болгарии.

У меня есть вопрос, касающийся minishop2 и корзины. Можно при добавлении продукта появляться например звездочка или номер в корзину значок самой? Это не о всплывающем окне при добавлении продукта, но это оказалось войдите или что-то еще, чтобы значок корзины самого.

Надеюсь на Вашу помощь!

Заранее спасибо!
Деян Димитров
22 октября 2015, 12:42
modx.pro
1 869
+1

Комментарии: 8

Victor
22 октября 2015, 16:01
0
К сожалению, но ничего не понятно, может быть проще на скриншоте показать?
    Василий Наумкин
    22 октября 2015, 16:01
    0
    Hi, Deyan! I think you`ll don`t mind if i`ll copy your question from my email on english. It think it`s more clear

    I'm using an image link for the basket, not a text link. Is there a way to show when there is something into the basket and when the user add some product to the basket — for example showing a basket with a star when it's filled with a product/s and just a simple basket icon when it's empty?

    As I understood, you want to show somehow that a product is already in a cart, right?
      Деян Димитров
      22 октября 2015, 16:03
      0
      Yeah, that's right, I want to show somehow that there is a product in the cart already added.
        Василий Наумкин
        22 октября 2015, 16:12
        0
        This work can be split into 2 actions:

        1. Add hidden element to chunk with product and show it when product is added to cart. You need to use some javascript for it. You can make it with miniShop2 callbacks.

        2. Show this element when page is rendered without ajax. I prefer to do it with &prepareSnippet option of pdoTools, but you can do it with your own snippet.

        Here is possible solution for your question — modx.pro/solutions/4844-dynamic-buy-button-in-the-shopping-cart/ (on russian)
        Деян Димитров
        22 октября 2015, 16:36
        0
        Thank you for the quick response!

        Just to be sure I'm sending you a screenshot example of what I mean. I want this pink circle near the cart/basket with number 3 inside to be shown when user add some product to the basket. In my case I just want some star for example to be added near the cart icon.

        Screenshot
          Василий Наумкин
          23 октября 2015, 06:06
          0
          Please reply to comment by clicking on link «reply» — than i will receive notice about your comment.

          As i see on the screenshot, you want just display the icon with total number of products in cart. That is a much easier — just call snippet msMiniCart and change tpl.msMiniCart to something like:
          <div id="msMiniCart" [[+total_count:isnot=`0`:then=`class="full"`:else=``]]>
          	<div class="empty">
          		<h2><i class="glyphicon glyphicon-shopping-cart"></i></h2>
          	</div>
          	<div class="not_empty">
          		<h2><i class="glyphicon glyphicon-shopping-cart"></i> (<strong class="ms2_total_count">[[+total_count]]</strong>)</h2>
          	</div>
          </div>


          There are two divs for empty and not empty cart.
        Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
        8