The cart is based on the item submission forms. We use heavily modified forms of the standard ZOO. This allows us to use various field types in the form (strings, radio, checkboxes and even attach files). All of them will go through validation like in an usual item submission form.
We'll review the cart configuration from the start. We'll make something similar to the cart on a demo site.
Firstly, you need to make a separate JBZoo application (new tab). For your convenience, you can give it an "orders" alias. All orders from the cart will be saved here.
Create a new submission in this application:
Go to the "Config" and select the "Cart" tab. Set these parameters:
Other settings are optional. You can read their descriptions in the tooltips.
So the application is now configured as a shopping cart. It's better not to use it for any other purposes or item types, or else it will become messy.
Enabling cart module
Go to the module manager and create a new "JBZoo Cart" module or use an existing one. This module displays cart information and a link to the cart page. Specify these parameters in the basic settings:
Template settings are optional and self-explanatory. Don't be afraid to try them and see what is better for you. Also, don't forget to publish this module and put it in some position and choose menu assignment.
Configure Order templates layouts (optionally)
It is important to remember about "JBZoo Cart Items" element. While invisible for the frontend, it is displayed during item editing (with an "Order" type). It plays an important role of saving selected products to a database. Then it displays them in the admin panel.
You can edit elements and template layouts here:
"Cogwheel" -> JBZoo App -> Order
Also you can edit template files located in this folder:
Add "JBZoo Price - Advance" to an item type of your products
Set a default currency and don't forget to choose a mode that has "add to cart" functionality (pop-up window, for example).
Now you have a shopping cart functionality. Orders are saved in their application, emails are sent to an administrator and a buyer (if he is logged in or specified his email during check-out.
In order to test a payments system, your website must be accessible from the Internet. It should not be on a localhost.
And it should be opened to anonymous users. Otherwise, the payment robot will be unable to pass successful payment information to your website.
Enable payment systems and Robokassa.
Apply settings and press "Get the link to API". You'll need these links to configure payment system from their side.
You'll fill "Login", "Password 1" and "Password 2" a bit later, after setting up a Robokassa account for your shop.
"Password #1" and "Password #2" should be at least 8 characters long with at least one letter and one digit. Don't forget to input these passwords in your JBZoo cart configuration as well.
Now you should copy the links that JBZoo generated into the corresponding fields.
You must choose "POST" method for every url.
Now you can test your payment system.
Enable debug mode for Robokassa in JBZoo cart configuration. During a debug mode money is not used but the behaviour of the payment robot is completely emulated.
Also try other buttons. The second one emulates behavior for a successful payment and the third one - for an unsuccessful.
If you'll get an error, check all configuration of your website and Robokassa.
Keep in mind that debug mode works only until you activate your shop in Robokassa. After you activate a shop, you'll be unable to change its domain there.
That's it. Now you know how to make a shopping cart with JBZoo and how to configure a payment system.
There will be native support of additional payment systems in the future releases of JBZoo so it will be even easier for you to accept payments.
If you have any questions or encountered a problem, feel free to ask about it on the forum.
Visit our special JBZoo tech support forum which is specifically meant for JBZoo so the priority of the response and its promptness are much better there than in any other place. With inactive account with a “Plus” sign in a tariff plan you can ask for support in one of these sections or use any of our contacts.