
Restrict the block only to content types from type Mug.Give the block a proper title like PayPal Button – Mug.Click Structure > Block layout > Custom block library > Add Custom Block.We only need to add the button to the theme template. Enter the same price you set when configuring the button on your PayPal account.Click Configuration > Performance > Clear all caches.Locate the nfig section and change the value of debug: false to debug: true.In case the file services.yml is not available, copy sites/default/ and rename it to services.yml. Change the image style to Large 480×480.Rearrange the fields in the Manage display tab in this order:.Click Structure > Content types > Add content type.It makes sense to create a content type called Mug. Let’s suppose we sell mugs to a cost of 6.95 USD.

Step #2.- Create the Product Content Type You will be redirected to another screen. It is only necessary to fill out the first part of the interface to have a functional button. The creation of a simple PayPal button has one required and two optional sections represented by accordion tabs.
#Drupal webform paypal how to#
If you do not know how to create a subtheme in Drupal yet, take a look at this article. Note: The creation of a subtheme is required. This is not the most accurate solution for this problem, however, it is the quickest and simple to implement. This snippet will be then hardcoded at the template (theme) level on your Drupal system.


PayPal allows you to create as many buttons as you like and embed them on your site through an HTML snippet. There are cases, in which you do not need full e-commerce functionality (like Drupal Commerce) in your Drupal site, because you only sell a few products and the implementation of such a solution is financially and/or timely not viable.
