Willkommen, Gast
Angemeldet bleiben:

THEMA:

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242133

  • Autor
  • cheddarnines
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Beiträge: 36
  • Dank erhalten: 0
How would you change the behavior of the PayPal button to require a shipping address when the user is redirected to PayPal?

Currently the PayPal button acts like a donate button, in which no shipping address appears in the PayPal transaction, nor is a shipping address required. - The same as if you had PayPal generate a "Donate button" with the "Make a PayPal Button" option on PayPal's site.
(See the first image)

If you were to make a "Buy Now" button with the "Make a PayPal Button" options on their site and select "yes" from "Do you need your customer's shipping address?" in the "Step 3: Customize advanced features (optional)" settings you get the results shown in the second image with includes the users address in and allows them to change that, or add another address on PayPals site when they are paying.

I want to remove the address fields from my forms and just have the user use PayPal to enter (or change) that information on PayPals site. (See second image)

Thanks for your help.
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242143

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,

it is a simple payment button, slightly differs from donations.

However, I just created an option for you to enable shipping address prompting at paypal.

In order activate it, please create a hidden input and give it the name "PayPalSelect" (title doesn't matter).

Add this as default value into the field
Product Name|1|10|0|1

- The first "Product Name" is the item name of your product.
- The second your item number.
- The third your item price.
- The last is the new optional shipping flag (1 for shipping prompting, 0 for no shipping).

If you alredy use "PayPalSelect" with a dropdown, then simply add "|1" to your definition of the selection values.

Here is a post that describes PayPalSelect further. It is meant to be for dropdowns but can also used with hidden inputs if you don't need selections as described above:

crosstec.org/de/forums/15-usage/5303-pay...ple-prices.html#5303

Then finally download, unzip and copy the file attached to:

/components/com_breezingforms/

If it works for you, then I will keep it in the next update.

Dateianhang:

Dateiname: facileform...6-02.zip
Dateigröße:60 KB


Regards,
Markus
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242345

  • Autor
  • cheddarnines
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Beiträge: 36
  • Dank erhalten: 0
This works great. Thanks for doing it!

Subscribed to a lifetime membership long ago, very glad I did. You guys are the best. Thanks Much for all your help over the years.

Cheers - Dan S.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242346

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,
no problem, anytime!

If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)
extensions.joomla.org/extension/contacts...orms/breezing-forms/

Many thanks & Regards,
Markus

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242350

  • Autor
  • cheddarnines
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Beiträge: 36
  • Dank erhalten: 0
I will do.

Just a bit more here on this subject that may help someone else reading this post that is trying to mess with PayPal.

When I was researching this here on the forum I came across a few posts in which people were asking about passing form information to PayPal. - This is not possible due to PayPal not Breezing Forms.

However you can pass some basic information by using the item number or name. - I needed to do this to get some shirt sizes into PayPal with an order so I could just fill the orders from PayPal's data.
Someone else may want to do something similar.

I have a bunch of size dropdowns (up to 12 in total for size values like XL,YS etc . . .) in this example but this could be changed to work for almost anything you need.

In this example I have dropdowns named "size01" , "size02" , though "size12"
When the user submits the form, the PayPal click action just strings all the sizes together and then that is used for the product number for the PayPal transaction. This will work until you exceed the PayPal's limit of characters for that data.
function ff_payWithPayPal_action(element, action)
{
    switch (action) {
        case 'click':
          
            var sizesInOrder = "Odr"
            var numberOfShirts = (ff_getElementByName('numberOfShirts').value);
            for (i = 1; i <= numberOfShirts; i++) {
            //get the size value of current shirt number
            var thisSizeNumber = ("0" + i).slice(-2);
            var thisSize = (ff_getElementByName('size'+thisSizeNumber).value);
            sizesInOrder = sizesInOrder + "-" + thisSize;
            }
            console.log (sizesInOrder);
            
            
            ff_getElementByName('bfPaymentSelect').value = 'Donation to charity|' + sizesInOrder + "|" + ff_getElementByName('total').value + '|0|1';
            ff_validate_submit();
            
            break;
        default:;
    } // switch
} // ff_payWithPayPal_action

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Make PayPal button work like a "Buy Now" button instead of a "Donate" button 3 Monate 3 Wochen her #242356

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,

thank your for sharing this!

Regards,
Markus

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
Moderatoren: ForumSupport
Ladezeit der Seite: 0.057 Sekunden

Angebot

Sommer Special! Alle Mitgliedschaften zum Sonderpreis!

Prio Support, alle Extensions und alle Templates in einem Paket.

Hier geht's zur Bestellung

Crosstec hilft sparen!

Falls Sie neu bei Crosstec sind aber bereits einen Formulargenerator bei einem anderen Hersteller gekauft haben, dann bekommen sie von uns einen Rabatt von 25% auf unsere 1-Jahres und Pro-Mitgliedschaften

Wie Sie an den Rabatt kommen?

Schreiben Sie uns einfach eine kurze Email mit beigelegten Kaufbeleg (z.B. PayPal Quittung) an sales@crosstec.org.

Wir unterstützen die Joomla Community

Crosstec unterstützt weltweit alle offiziellen Joomla! User Groups und Organisatoren von Joomla! Days die bei Joomla.org registriert sind.

Falls das auf dich zutrifft und du eines unserer Produkte brauchst, schreib uns eine kurze Email an info@crosstec.org und du bekommst eine Flatrate-Mitgliedschaft geschenkt!