3 ways to create a small Joomla! shopping cart with RSForm!Pro and PayPal
Posted by. Mihaela This article was posted in RSForm!Pro Tagged with joomla extensions , forms , plugins , PayPal , shopping cartFirst of all, I will share with you a gorgeous recipe, one that you can apply for a variety of Joomla! sites.
- we take 1 Joomla! form created with RSForm!Pro
- the RSForm!Pro PayPal Plugin
- like other successfully recipes, one secret ingredient that will add that all important touch to the final result, custom script example that enhances the flexibility and allows you to use quantity, products and donations.
------------------------------------------------------------------------------
Result = the perfect symbiosis between the most popular Joomla! form and the most popular payment processor.
What we want to explain
Enough talking...briefly, this article will explain how can you turn your Joomla! site into a small shopping cart, when to use the RSForm!Pro PayPal Plugin and when to use the custom script so you can decide yourself which one suites best for your project.
This article is part 1 of a 3 part series:
- in the first part, we will talk about the RSForm!Pro PayPal Plugin with the Single Products field
- the second article will have information and screenshots about the RSForm!Pro PayPal Plugin with the Multiple Products field and the video tutorial How to add PayPal functionality to your Joomla! forms using the RSForm!Pro PayPal Plugin
- the last article will explain the custom script available on the forum with some examples.
Before we start, let's first answer a basic question:
When to use the RSForm!Pro PayPal Plugin and when to use the custom script?
The RSForm!Pro PayPal plugin allows you to add to your forms PayPal fields for selling products trough the payment processor. It can be used successfully for selling one or multiple products with a fixed amount.
The custom script extends the form flexibility and can be adapted for different kinds of scenarios, e.g. when you want to specify the products quantity, for products that don't have a fixed amount (calculated value) or donations.
1. The RSForm!Pro PayPal Plugin:
Download:
The RSForm!Pro PayPal plugin allows you to add PayPal functionality to your Joomla! forms, it integrates with any form created with RSForm!Pro, doesn't require a special setup in the PayPal account and can be downloaded free (requires an active license of RSForm!Pro) from View my downloads -> RSForm!Pro files > Plugins .
Installation: The plugin installs like any other Joomla! plugin/module/component by uploading the file in the backend administrator panel. (Head to Extensions -> Install/Uninstall -> Upload Package File).
Configuration: After downloading and installing the plugin, you must configure it from Components-> RSForm!Pro -> Configuration so it can work with PayPal.

You will see a new tab called PayPal, near the Settings tab.
Here you can set the seller's PayPal account, the Live Mode (set it to "No" when you want to test the plugin with PayPal Sandbox and to "Yes" when you want to enable your PayPal transactions), the Currency which usually is EUR or USD, but you can find other PayPal currency codes on the developer's page, the Return Url - the page where the user is redirected after making a payment, the Thousands and the Decimal Separator.
How to add PayPal functionality
After Configuration, in the backend panel head to Components -> RSForm!Pro -> Manage Forms and select the form for which you want to add PayPal functionality.
In the bottom of the page you will see 3 new PayPal fields (besides the usual components like Textbox, Textarea, Dropdown or Checkbox): Single Product, Multiple Products and Total.
We will treat each field separately, so you can better understand how to use them.

- A Total field that calculates the total amount must be added at the end of the form, whether you will be using the Single Product or the Multiple Products field.
- The Multiple Products can be used multiple times, but the Single Product and the Multiple Products fields can not be used simultaneously.
1.1 The RSForm!Pro PayPal Plugin with a Single Product field
The Single Product field is used for selling one product, fixed donations or attachments.
Let's see an example of using the plugin with a Single Product field and a Total field:
A non-profit organization site wants to collect donations trough their Joomla! form, with a pre-established amount of USD 10. To achieve this, we will add a Single Product PayPal field and a Total field to the form created with RSForm!Pro.

Backend Preview:
This is how the form looks in the backend after adding the above PayPal fields:

Frontend Preview:
And this is how the form looks in the frontend after adding the Single Product field. Notice that this field isn't displayed in the frontend because we have selected "not to show in frontend" option.


A PayPal button won't be necessary anymore, because the Submit Button will handle its function. After clicking the Submit Button, the user will be redirected to the PayPal Page.
The transaction page:
The transaction page lists the product's information: its description, price, quantity and the total amount that will be withdrawn from the user's PayPal account.

Verify the payment status:
To verify the payment status in the backend Joomla! panel, head to Components -> RSForm!Pro -> Manage Submissions. The status will be automatically changed to Accepted after PayPal sends a notification to your script. If the payment is refused, the status changes after 12 hours into Denied.

Next article will explain how to use the Multiple Products field within the RSForm!Pro PayPal Plugin. We have prepared a video tutorial and an example of using the Multiple Products field with a checkbox and a dropdown view.
So, see you next time. If you have questions, please leave them in the comments.
Related articles:
- 3 ways to create a small Joomla! shopping cart with RSForm!Pro and Paypal - Part 2
- 3 ways to create a small Joomla! shopping cart with RSForm!Pro and Paypal - Part 3
- 3 ways to create a small Joomla! shopping cart with RSForm!Pro and Paypal - Part 4: payment confirmation











* JInstaller::ins tall: SQL Error. DB function failed with error number 1146
Table 'web172-a-joo-160.jos_rsform_comp onent_type_fiel ds' doesn't exist SQL=DELETE FROM `jos_rsform_com p onent_type_fiel ds` WHERE `ComponentTypeI d` = 21 ;
SQL =
DELETE FROM `jos_rsform_com p onent_type_fiel ds` WHERE `ComponentTypeI d` = 21 ;
* Component Install: SQL error or missing or unreadable SQL file. DB function failed with error number 1146
Table 'web172-a-joo-160.jos_rsform_comp onent_type_fiel ds' doesn't exist SQL=DELETE FROM `jos_rsform_com p onent_type_fiel ds` WHERE `ComponentTypeI d` = 21 ;
SQL =
DELETE FROM `jos_rsform_com p onent_type_fiel ds` WHERE `ComponentTypeI d` = 21 ;
not sure what to do?Quote
We are organising an event where people can also pay on the day itself but still need to register.
So I needs something where the user can choose if he want to pay directly with paypal or otherwise pay 10 euro more at the day itself.
In the last case the paypal website shouldn't appear
I hope somebody can help me?
Quote
You will actually have to use the custom scripting examples, like the one posted on part 3:
http://www.rsjoomla.com/blog/158-3-ways-to-create-a-small-joomla-shopping-cart-with-rsformpro-and-paypal-part-3.html
You will have to introduce and extra condition, something like:
if($_POST['form']['radio_field'] == 'Pay in that day')
{
//paypal code nadling here
}
Hope that this helps!Quote
www.paypal.com with www.paypal.com/de
Quote
« First
«
1