March 26, 2014 at 7:24 pm #9560
So, this is probably going to sound like a stupid question BUT….I need help.
I am making a new template and I am showing my products by category. When the user taps on a thumbnail, a popup opens and I want the BUY NOW button there.
I have everything done EXCEPT the correct buy now code. How do I make the product id dependent upon which thumbnail is clicked?
All of the examples are shown with a prod id of 1, for example. I have tried using $id but obviously that doesn’t work.
Here is my PHP line:
<?php echo do_shortcode('[wp_eStore_add_to_cart_custom_button id=2 button="http://www.appstorexxx.com/media/buy.png"]'); ?>
See where it says 2? I need that to be like $id or similar….is that possible?
Thanks for any help…
P.S. I don’t necessarily have to use a shortcode…if there is a better way, pls advise.March 27, 2014 at 4:54 am #61864adminKeymaster
You can pass the ID via URL query parameters. And then get that value from the query parameter in your popup window and use it. You will need to be a good developer to be able to do this though.March 27, 2014 at 11:24 pm #61865
hi there – so I am almost there! Just 2 quick questions….Crossing my fingers you can help me. I have been able to figure out the code that I need by using this:
<?php echo print_eStore_buy_now_button($app['id']); ?>
And it works … It brings the user to buy the clicked item, BUT it is using the Paypal payment method instead of the methods I use which is CCBill, and/or the Credit Token Plugin.
#1 – Can you tell me the “php echo code” to use for one or both of my payment methods? (If I can only choose to use one, I guess I’ll go with CCBill directly and disable my credit token plugin.)
#2 – Is there a similar option to “Add to Cart” instead of “Buy Now”? I would like to have both buttons for the user to choose from (one on top of the other)
For now, you’ll see the “Buy Now” button on the icon instead of the popup…I’m still trying to figure that out. But, I’m def making progress. (I have only added this code to the top slider on this page.)
Thank you for any help you can provide…I really appreciate it.March 27, 2014 at 11:29 pm #61866wzpModerator
Buy Now buttons, by default, only work with PayPal:
You want an equivalent function for the wp_eStore_buy_now_for_specific_gateway shortcode.March 27, 2014 at 11:31 pm #61867
Oh shoot…I hope you see my edited post. You answered while I was editing. Yes, I do need an equivalent…can you tell me how I can do this in my php page?March 28, 2014 at 4:02 am #61868adminKeymaster
You can use the following function to create a gateway specific buy now button:
Here is an example:
<?php echo eStore_get_gateway_specific_buy_now_button_code($app['id'], 'ccbill'); ?>March 28, 2014 at 4:44 am #61869ellie123Member
Great – thank you so much I will try this and see if it works.
Am I pushing my luck to try and get an Add to Cart option? or Pay with Credit Tokens option? Or would I just format them both in a similar way?
My credit token option works great now, but I use the shortcode … Is there a php option?
And I’m guessing there’s already a php way for me to do add to cart, right? Did I miss this in the shortcode/php PDF?
Sorry to be a pain in the ass…I appreciate your help….March 28, 2014 at 4:46 am #61870ellie123Member
I should clarify….my credit token option works with the shortcode on an individual post/page.
I haven’t been able to get it to work on this php template. I need to use a similar PHP code as you and I have come up with for the Buy Now option….
Have a good night – and thanks again.
- You must be logged in to reply to this topic.