Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PayPal button to product page #45

Merged
merged 5 commits into from
Jul 14, 2020

Conversation

seand7565
Copy link
Contributor

@seand7565 seand7565 commented Jun 24, 2020

Depends on #43 and #42 merged 😬

  • Renames orders_controller create action to show to be more inline with what it does
  • Creates a new create action for orders_controller that actually creates a new order for the user
  • Add button and button action JS for the product page
  • Add preference to determine if the product page displays the PayPal button
  • Add deface/views to add PayPal button to product page, similar to how the cart button is displayed

Fixes #27

@seand7565 seand7565 force-pushed the add_product_button branch 3 times, most recently from 7cdd047 to b4bc8d9 Compare June 25, 2020 14:54
@seand7565 seand7565 force-pushed the add_product_button branch from b4bc8d9 to 654bf20 Compare June 29, 2020 20:15
@seand7565 seand7565 force-pushed the add_product_button branch 2 times, most recently from 4c195b1 to dd92dde Compare June 30, 2020 19:53
@seand7565 seand7565 force-pushed the add_product_button branch 6 times, most recently from 5ca2b12 to 64669aa Compare July 6, 2020 20:34
@seand7565 seand7565 marked this pull request as ready for review July 6, 2020 20:34
@seand7565 seand7565 requested a review from elia July 6, 2020 20:34
@seand7565 seand7565 force-pushed the add_product_button branch from 64669aa to 7db0494 Compare July 7, 2020 20:09
@seand7565 seand7565 requested a review from elia July 7, 2020 20:09
@seand7565 seand7565 force-pushed the add_product_button branch 2 times, most recently from 0277fa0 to 662464e Compare July 9, 2020 14:11
Copy link
Member

@elia elia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple more questions, and possibly a pending change related to #45 (comment)

seand7565 added 5 commits July 9, 2020 13:08
The create action doesn't _actually_ create anything, it simply formats the order to something
usable by PayPal, sends it off to them, and returns the response. It's really more of a show
action, so I'm renaming it as such. And since it shows the `paypal_order` object, I'm moving
it to a paypal_orders controller.

..Plus, I need to use the create action for the next commit. 😅
Adds an API endpoint to control order creation from the product PayPal button.
The users existing order - if any - is replaced with this new order. This order
should contain only the chosen quantity of the selected variant on that product
page. It also associates the current user with the order, if it can find them.
Adds the ability to use the PayPal button on the product page,
create a new order, and check out with only the selected product.
Note that variant_id, quantity, and user_id will all have to be
populated in the SPCP namespace when the button is loaded in.
Adds a preference to toggle the product page, and a partial name
to use for the product page paypal button view.
Adds deface override which adds in a payment buttons partial - this partial
can handle multiple payment buttons, so if other payment methods want to
add their own instant checkout buttons, it's possible. It can also
handle multiple SPCP buttons, if for some reason the store wants multiple.
@seand7565 seand7565 force-pushed the add_product_button branch from 662464e to ad1ce24 Compare July 9, 2020 18:11
@seand7565 seand7565 merged commit 639443b into solidusio:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PayPal button to product page
2 participants