Year End Offer: Use Coupon: yearend on checkout page to get 20% discount on any plugins.Buy Now!
Public Ticket #1783

Compatibility with ProductX

Marco

Hello. Is Product Variation Table compatible with ProductX? I’ve tried to add Product Variation Table shortcode both in my template and in my product (not at the same time, of course) but it doesn’t work: instead to redirect to the checkout the buy button of the Product Variation Table scroll page to top…

Marco

Marco

I have realized that the poage scrolls up to show that the product has been added to the cart but for some reason (probably because I don't have an element to display notices, the message didn't show.

So that problem is now solved.

Thank you

wpx

wpx

Hi Marco,

I hope you are doing well today. You can disable this option: https://prnt.sc/uRrGDMy0XBhe to stop the auto scroll after adding a product to the cart.

Please do not hesitate to reach out to us if you have any further questions or concerns. Hope to hear from you soon.

Thanks

Marco

Marco

Thank you for replying.

Yes, I had already seen that, but my problem was to redirect the user to the checkout page.

I had to slightly modify the file inc/frontend/class_pvtfw_cart.php adding a line of javascript using window.location.assign() function.

Now I have to understand how to avoid this change be overwritten with the next plugin update :)

Maybe you can consider to add this option to the plugin.

Thank you so much for your help and for the plugin itself :)

Cheers

wpx

wpx

Hi Marco,

It is not recommended to make modifications to the plugin code, as any changes made will be overwritten when a new release is published. Therefore, kindly remove the modifications you have made. Instead, insert the following code using the Code Snippets plugin or add the snippet inside your child theme's functions.php file:

add_filter('pvtfw_cart_redirect_url', function($url){
if( is_product() ){
$url = site_url('/checkout');
return $url;
}
}, 10);

Please let me know if it resolves your issue or not. Hope to hear from you soon.

Thanks

wpx

wpx

Hi Marco,

If you didn't enable the Redirect to the cart page after successful addition from WooCommerce > Settings > Products > General > Add to cart behaviour then try the following snippet:

add_filter( 'pvtfw_added_cart_filter', function($script){
$cart_url = site_url('/checkout');
$script2 = sprintf('window.location.href = "%s"; return;', $cart_url);
return $script2;
}, 10, 1);

Please let me know your feedback.

Thanks

Marco

Marco

Oh, great! It works perfectly, thank you very much! :)

wpx

wpx

Hi Marco,

I am delighted to hear that our support and plugin have been helpful to you. Your satisfaction is our top priority, and we are committed to providing the best possible products and services to our customers.

If you would be so kind as to leave a review of our plugin, we would greatly appreciate it. Your feedback is important to us and helps us to continue improving the quality of our products and services. You can leave a review by following this link: https://wordpress.org/support/plugin/product-variant-table-for-woocommerce/reviews/?filter=5

Your review will not only help us to improve, but it will also inspire us to continue providing the highest level of support and service to all of our customers.

Thank you for your support and for choosing our plugin.