- This topic has 2 replies, 2 voices, and was last updated 14 years, 2 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple Shopping Cart Tweaks › Creating a Review Page and checkout page
Okay, I am trying to create a 3 Step checkout process.
Step 1 – Reveiw and upsell page, (want to replace the PayPal button with a new button to go to Step 2)
Step 2 – Fill in a form, which once submitted will provide link to go to Step 3 (this is entirely outside this Plugin, except for linking to in from Step 1 and directing to Step 3)
Step 3 – Review full cart (hopefully with new upsell items!) and show PayPal Payment Button (This functions with the default short code)
what I have done is adjusted the widget so that it will direct to Page 1 instead of showing the PayPal button. I did this by copying the function print_wp_shopping_cart(), renaming it accordingly and then changing the bit in the widget call to call the modified function instead of the original function. Works well.
Thought I could do the same with this, but it didn’t quite work – I think my problem is creating a new short code for this bit. I copied the function print_wp_shopping_cart() again and renamed it print_wp_shopping_cart_step_1, then I created a new print_wp_shopping_cart_step_1_handler fucntion and then copied the shortcode bit and amended accordingly, but it did not work. Surely this is an easy fix, I am probably just missing something… of course something crucial!
Any help?
Say for example your function name is the following:
print_wp_shopping_cart_step_1()
To display the content of this function using a shortcode add the following bit of code:
add_shortcode('print_wp_shopping_cart_step_1', 'print_wp_shopping_cart_step_1_handler');
function print_wp_shopping_cart_step_1_handler($atts)
{
return print_wp_shopping_cart_step_1();
}
Now, you can use the following shortcode to display it:
[print_wp_shopping_cart_step_1]
Yep that did it! Perfectly!