• Resolved rguthrie

    (@rguthrie)


    Each time I create a new button, a new view cart button/shortcode is also produced. Have you come across this before, to point me in the direction of a solution?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @rguthrie, I’m Sorry but I’m getting confused when you say a new view cart button is produced, can you please explain?

    Thread Starter rguthrie

    (@rguthrie)

    Sorry for not being clearer. Every time I create a new Paypal button with the button manager, a button and short code is also produced to see the shopping cart, resulting in multiple instances. A picture speaks a thousand words Screen grab of button manager page

    • This reply was modified 6 years, 8 months ago by rguthrie. Reason: Clarification

    @rguthrie, I’m so sorry for delay in response, But the image is not opening. Also, Every-time you will create a new button, it will be a separate short-code and all of them work independently and takes you to PayPal payment page directly. They are different than a regular WC product. Hope that will clear the confusion.

    Let me know if you have any other questions about that.
    Thanks!

    Thread Starter rguthrie

    (@rguthrie)

    For anyone else experiencing this problem, I will post my solution: The plugin makes a check to see if a view cart button already exists for a particular company before creating one. It does this by checking the meta_value of a paypal_wp_button_manager_viewcart_button_companyid entry in the postmeta table of the MYSQL database. For a reason that I have not yet been able to work out, when a paypal_wp_button_manager_viewcart_button_companyid entry is written to the table, a null value is being assigned to this meta_value, so that when the check is made the next time, it does not think that a view cart button has already been made, and generates another paypal_wp_button_manager_viewcart_button_companyid entry, also with a null meta_value entry. And so on…

    On the instance of the paypal_wp_button_manager_viewcart_button_companyid with the lowest post_id, I changed the meta_value from null to 1 (the post_id of my company. If you have more than one company set up, you will need to enter the appropriate company post_id). Now the check mentioned above comes back positive, and I have since been able to create a new button/short code without an additional view cart button/short code also being generated.

    You will need access to the database itself in order to effect this change.

    Plugin Contributor angelleye

    (@angelleye)

    Thanks for the feedback. We’ll add this to our GitHub repo for the next update and make necessary adjustments to avoid confusion here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple View Cart buttons’ is closed to new replies.