Blog

GravCart 1.1 released

With tons of fixes and improvements, GravCart 1.1 is now released.

If you spot any problem, let me know through the GitHub issues.

Full list of new changes since version 1.0.7:

Features

* "Add to cart"-button functionality on products list page. Updated [#35](https://github.com/flaviocopes/grav-plugin-shoppingcart/issues/35)
* If no checkout plugin is installed, alert the site owner. Currently alerting in the frontend since this alert is likely to be encountered just when building the site
* Product image in cart, optional
* Added option to set the product image size in the product page
* Added option to set the product image size in the cart
* Add option to remove cents if .00
* Ability to configure the plugin options via the Admin interface
* Ability to edit the product through the Admin Pages view. Can currently set the price and set the default picture from the page media
* Added more events to support more addons features. Documented in the Plugin documentation site
* Added the ability to show the cart widget on pages not directly managed by the plugin (e.g. default pages, blog or any other page). Documented in the Plugin documentation site

Improvements

* Add a ShoppingCart.provinceIsRequired() utility function
* Add support for Grav 1.0.x and Form 1.2.x in the 1.1 release
* Extracted the Add to Cart code in a separate partial for easier override
* Default to ignore some checkout information
* Move onBeforeAddProductToCart and  onAfterAddProductToCart events inside ShoppingCart.addProduct
* Improved rendering of cart on mobile devices
* Added support for shortcodes addon
* Translate quantity string
* Added first acceptance tests
* Add wrapper div in order confirmation
* Changed structure of the Twig files: `shoppingcart` has been removed in favor of `shoppingcart_categories`, `shoppingcart_section` is now `shoppingcart_categories`, `shoppingcart_category` is now `shoppingcart_products`. `shoppingcart_product` is the product page. Please rename your markdown pages accordingly. There's backwards compatibility, so at this point things will continue to work fine, but the old filenames are deprecated.
* Core reorganization
* More testing

Bug fixes

* Fix issue with shipping being reset while recalculated
* Fix #24 "All countries without specific rule" not working as expected. And also cleanup some useless methods
* Only require province is required, fix #25
* Fix #27 only execute controller tasks if available
* Fix labels in blueprint
* Fix saving the cart when no shipping methods are entered. Also add payment info when there's a single shipping method, instead of omitting it
* Fixed error in version number
* Fixed error in namespace
* Fixed issue with price > 999 and NaN shown when adding it to the cart
* Various small bug fixes and improvements

GravCart 1.1 beta progress

It's been a bit more than two weeks since I last wrote about version 1.1. In the meantime, some more beta versions were published.

Now it's all stable enough for a release, I'm basically waiting for Grav 1.1 to be out stable to publish it, as the Admin settings require Admin 1.1 to work in their tabbed interface.

If you can, test-drive version 1.1 beta on the Grav 1.1 beta release, and report any issue if you find one.

Here's the summary of the changes introduced since GravCart 1.1 beta 1:

Features

  • Added the product image in cart (optional)
  • Added option to set the product image size in the product page
  • Added option to set the product image size in the cart
  • Added option to remove cents if the price ends with .00

Improvements

  • Add support for Grav 1.0.x and Form 1.2.x in the 1.1 release
  • Extracted the Add to Cart code in a separate partial for easier override
  • Default to ignore some checkout information
  • Move onBeforeAddProductToCart and onAfterAddProductToCart events inside ShoppingCart.addProduct
  • Improved rendering of cart on mobile devices
  • Added support for shortcodes addon
  • Translate quantity string
  • Added first acceptance tests
  • Add wrapper div in order confirmation
  • If no checkout plugin is installed, alert the site owner. Currently alerting in the frontend since this alert is likely to be encountered just when building the site
  • Add a ShoppingCart.provinceIsRequired() utility function

Bug fixes

  • Fixed saving the cart when no shipping methods are entered. Also add payment info when there's a single shipping method, instead of omitting it
  • Fixed an error in namespace
  • Fixed issue with price > 999 and NaN shown when adding it to the cart
  • Fixed #24 "All countries without specific rule" not working as expected. And also cleanup some useless methods
  • Only require province is required, fix #25
  • Fixed #27 only execute controller tasks if available
  • Fixed labels in blueprint

That's it for now! More news soon :-)

Released 1.1.0-beta.1

Today I published the pre-release versions for Shopping Cart core and addons. Some pretty new stuff I've worked on in the last 2 months.

They will appear soon in the Testing channel of Grav 1.1.

Let's see a summary of the most important changes.

New Core Features

  • Ability to configure the plugin options via the Admin interface
  • Ability to edit the product through the Admin Pages view. Can currently set the price and set the default picture from the page media
  • Added more events to support more addons features.
  • Added the ability to show the cart widget on pages not directly managed by the plugin (e.g. default pages, blog or any other page).

Improvements

  • Changed structure of the Twig files: shoppingcart has been removed in favor of shoppingcart_categories, shoppingcart_section is now shoppingcart_categories, shoppingcart_category is now shoppingcart_products. shoppingcart_product is the product page. Please rename your markdown pages accordingly. There's backwards compatibility, so at this point things will continue to work fine, but the old filenames are deprecated and will probably removed the future.

Of course there were also bug fixes, various code improvements and minor changes here and there. Those interested in the small details can have a look at the GitHub commits, as always.

New Addons

Working with version 1.1 of Grav Shopping Cart are some new free addons that i now "soft launch", although they will take some days to be in the GPM, you can now install them manually:

Manual Checkout

Also called "Offline payments". This gateway is useful for processing check or direct debit payments. It simply authorizes every payment.

Very useful for easy and fast testing, as there's no need to "fake" a purchase using Stripe / PayPal sandboxes. Still, be sure to test those too when testing that their specific integration works.

Email Notifications

Enables email notifications triggered when the order is confirmed. See usage instructions.

Product Variations

This addon adds an option in the Admin panel to have variations on your products. The variation options will be shown in the product page. You can set an option to be required, or optional.

There's still an issue, the "Variations" option is added to all pages currently, will be solved for its final release.