We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44922
    • 131 Posts
    We've got an install of Minishop2 on 2.4.2, which we're pretty sure was working fine, but now not.

    We've got different category pages calling [[!msProducts]] in the template pulling a tpl to list the products. If the user clicks on any 'Add to cart' directly on the list page, there is no problem. Products are added to the cart, the user can check out all works ok.

    But if the user clicks on the individual product listing and visits the individual product page, then clicks 'Add to Cart', going to the shopping basket shows nothing added to cart. Also, anything added to the cart in on the previous category list page is also wiped out. The individual product page calls a version of chunk 'msProduct.content' and msGallery snippet, no other snippet is called.

    At the top pf every page, w've got a little cart indicator using [[!msMiniCart]]. If you click on 'Add to Cart' on the individual product page, it does show that the product has been added (still wiping out whatever was there before!) but then heading off to the cart shows nothing.

    We're pulling our hair out!

      • 52741
      • 4 Posts
      Check your cart page. There is must be an uncached snippet [[!msCart]]. Or can you show your site?
        • 44922
        • 131 Posts
        It is using an uncached [[!msCart]] - but this is being called from within a chunk. Call the chunk uncached too?
          • 44922
          • 131 Posts
          Tim, that didn't work.

          On the template for the categories - the lists of products, we call [[!msProducts]]
          On the actual individual product template, there is no snippet call, just a <form method = "post"> calling [[*id]], [[+price]] etc.
            • 44922
            • 131 Posts
            An update on this. Turns out installing Google Analytics causes the Minishop checkout / cart to stop working properly.

            We never worked this out before as the time of the original post. We reverted to an earlier dev version after hours of combing the code for errors. Turns out the earlier dev version was prior to adding Analytics and we've just added this again now and suddenly we're back the cart not working. Doesn't matter whether Analytics js code is in the head, body end of the body. There are no Apache errors in the logs, no Modx Minishop error logs so it just looks like a clientside JS clash.

            Does anyone know why this may be? With Google Analytics so ubiquitous, it seems a bit lame delivering a cart which can't track it's own pages.