We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    Hi, any other Simplecart (modxsimplecart.com) users (latest version v2.2.15) having issues with Coupon codes in the latest version?
    We're getting a PHP fatal error when applying a coupon code since upgrading to v2.2.15.

    Full error:

    mod_fcgid: stderr: PHP Fatal error: Call to a member function calculate() on a non-object in /path/to/core/components/simplecart/controllers/web/Cart.class.php on line 1414

    // Running PHP Version 5.4.25 / FastCGI


    Thanks.

    This question has been answered by multiple community members. See the first response.

    • You'll probably want to shoot this over to Bert via support at modxsimplecart.com - chances are he wont see it here.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 17412
        • 270 Posts
        Thanks Mark, I do have an open ticket with modxsimplecart.com support. The ticket was acknowledged though doesn't seem to be a priority so I'm hoping to crowd source some support here instead as I need to progress with my clients' website.
          • 9995
          • 1,613 Posts
          I checked on my site, my site goes blank.
          Then going to the homepage its blank as well.
          Looks like there goes something wrong with the cookie/session?
          I'm not a programmer but now you know its not only on your site wink
            Evolution user, I like the back-end speed and simplicity smiley
            • 17412
            • 270 Posts
            Hi fourroses666 - thanks for taking the time to test this and I appreciate the validation! Yep that's exactly what happens on my clients' site - I need to clear browser cache to view the site after applying the cookie. Have you reported the issue to modxsimplecart.com? It seems like a bug that merits some attention to me.
              • 9995
              • 1,613 Posts
              No I haven't, didn't knew it didn't work. I'm not that active with the shop actually.

              I did found a bug when you would like to delete a product from your shoppingcart, the X button doesn't work. Also can't find a way to fix the breadcrumbs.

              These two I reported.

                Evolution user, I like the back-end speed and simplicity smiley
                • 17412
                • 270 Posts
                Just FYI - In v2.2.15 the remove from cart function works fine for me.
                  • 9995
                  • 1,613 Posts
                  After update Coupons doesn't work either.

                  --------------------------

                  Don't want to pollute this post but remove still doesn't work on my shop. Maybe I need a SC reinstall instead of update. Also there is no update button when changing the ammount :-o

                  In chunk cartRow I have:
                  <tr>
                      <td><img width="60" src="[[+cart.product_image]]" alt="" /></td>
                      <td>
                          [[+cart.pagetitle]]
                          [[+cart.options:notempty=`<br/>[[+cart.options]]`]]
                      </td>
                      <td>
                          <div class="input-append">
                              <input type="number" name="quantity[[[+product.key]]]" min="0" value="[[+product.totals.quantity]]" class="span1 text-center" />
                              <button type="submit" name="remove[[[+product.key]]]" value="[[%remove]]" class="btn btn-danger">
                                  <i class="fa fa-close"></i>
                              </button>
                          </div>
                      </td>
                      <td>[[+cart.product_price_formatted]]</td>
                      <td>[[+cart.product_tax_price_formatted]]</td>
                      <td>[[+cart.product_tax_in_formatted]]</td>
                  </tr>
                  
                    Evolution user, I like the back-end speed and simplicity smiley
                    • 17412
                    • 270 Posts
                    Just a thought though I have seen some weirdness before between using <button and <input for the submit. Have you tried to switch the <button to <input type="submit" ?

                    • discuss.answer
                      • 17412
                      • 270 Posts
                      For chunk: scCartRow this is what I have: (the remove button placed beneath the product title and cart update button placed next to quantity field).
                      This is working in v2.2.15.
                      By default the update button is included in scCart chunk though also works effectively in scCartRow.

                      <tr class="[[+product.rowclass]]">
                      	<td class="image"><img src="[[+product.product_image:phpThumbsUp=`w=70&q=95`]]" alt="[[+product.pagetitle]]" /></td>
                          <td class="title product-column" colspan="2">
                              <strong>[[+product.pagetitle]]</strong>
                              [[+product.options:notempty=`<br /><span class="options">[[+product.options]]</span>`:isempty=``]]
                              [[+product.fields:notempty=`<br /><span class="fields"><em>[[%simplecart.cart.fields]]:</em> [[+product.fields]]</span>`:isempty=``]]
                      		[[+product.longtitle:isnot=``:then=`<small>* [[+product.longtitle]]</small>`]]
                      		<span class="submit cart-update">
                      		<input class="cartLoading" type="submit" name="remove[[[+product.key]]]" value="[[%remove]]" />
                      		</span>
                          </td>
                          <td class="quantity">
                          <input type="number" name="quantity[[[+product.key]]]" min="0" value="[[+product.totals.quantity]]" />
                      	<span class="submit cart-update">
                                  <input class="cartLoading" type="submit" value="Update" />
                              </span>
                      	</td>
                          <td class="price">
                              [[+product.totals.price_formatted]]
                              [[+product.totals.discount_percent:notempty=`(- [[+product.totals.discount_percent]]%)`:isempty=``]]
                          </td>
                      </tr>