• Resolved kyleb08

    (@kyleb08)


    Hi,

    I was wondering if there was a way I could contact you via email? I have a couple of requests which I would like to discuss over email to see the possibilities.

    1 – If using WooCommerce Wishlists, how can I add the shortcode for this into the add to cart form so that it shows for each variation?

    2 – When this plugin is enabled on my site, I am getting a server 500 error when trying to update my single product page using elementor.

    3 – for mobile devices is it possible to hide certain columns so the user doesn’t have to scroll to the add to cart option?

    Look forward to hearing from you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter kyleb08

    (@kyleb08)

    The server 500 error happens when using this code:

    function pvt_support(){
    	global $pvtfw_table;
    	remove_action('template_redirect', array( $pvtfw_table, 'remove_add_to_cart'), 29 );
    
    }
    add_action('template_redirect', 'pvt_support');
    Plugin Author Hakik Zaman

    (@hakik)

    Hi @kyleb08

    Thanks for reaching out to me. Let me explain one by one-

    1 – If using WooCommerce Wishlists, how can I add the shortcode for this into the add to cart form so that it shows for each variation?

    Unfortunately, this feature is not available. But in the next release, I will try to add this. Right now, you can add an extra button beside the cart button. Here is an example code-

    function pvt_support_cart_filter( $string ){
            // Example shortcode
    	$var = do_shortcode('[caption]My Caption[/caption]');
    	return sprintf("%s<div class='shortcode'>%s</div>", $string, $var);
            //$string is button content
    }
    add_filter( 'pvtfw_row_cart_btn_is', 'pvt_support_cart_filter', 10, 1 );

    I will update the filter hook so that you can set your wishlist by using variation id.

    2 – When this plugin is enabled on my site, I am getting a server 500 error when trying to update my single product page using elementor.

    Are you using PVT shortcode in elementor builder? If yes, could you please give me a screenshot? Or, you can reproduce the issue by using Loom

    3 – for mobile devices is it possible to hide certain columns so the user doesn’t have to scroll to the add to cart option?

    I am really sorry. This feature is not available right now. But it is a great idea. I will keep it on my to-do list.

    Thank You

    Thread Starter kyleb08

    (@kyleb08)

    Thank you for your response.

    1 – If using WooCommerce Wishlists, how can I add the shortcode for this into the add to cart form so that it shows for each variation?

    For this query. Where is the ‘add to cart’ being generated from in your plugins code? I need to add a shortcode to the ‘add to cart’ form to ensure that the Wishlist button is grabbing the product ID for each item in the table.

    I am unsure if the code below adds the button to the add to cart form

    function pvt_support_cart_filter( $string ){
            // Example shortcode
    	$var = do_shortcode('[caption]My Caption[/caption]');
    	return sprintf("%s<div class='shortcode'>%s</div>", $string, $var);
            //$string is button content
    }
    add_filter( 'pvtfw_row_cart_btn_is', 'pvt_support_cart_filter', 10, 1 );

    Are you using PVT shortcode in elementor builder? If yes, could you please give me a screenshot? Or, you can reproduce the issue by using Loom

    Yes I am using the Elementor Page builder. The error I am getting is when I attempt to save the page ‘Server 500 error’ or I have tested on a different website and it isn’t even letting me open the single product page template.

    Only when using the below code.

    function pvt_support(){
    	global $pvtfw_table;
    	remove_action('template_redirect', array( $pvtfw_table, 'remove_add_to_cart'), 29 );
    
    }
    add_action('template_redirect', 'pvt_support');

    We need this code to work correctly as on mobile devices we will need to keep the regular ‘add to cart’ form as the product variation table is not mobile responsive.

    Thank you for your help ??

    Thread Starter kyleb08

    (@kyleb08)

    Or alternatively, is it possible to use the default add to cart form code within your plugin? This way I can bind the shortcode to the form so it can work.

    Plugin Author Hakik Zaman

    (@hakik)

    Hi @kyleb08

    Unfortunately, I didn’t use <form> in the variation table. Each button contains variation id and product id and full event processed by ajax call.

    Could you please share the parameters of your shortcode? I mean, how your shortcode looks like. For example- [wishlist id="%variation_id%"] or [wishlist id="%product_id%"]

    when I attempt to save the page ‘Server 500 error’

    Could you please record for me the whole scenario (including- how you pasted the code)? It will help quickly figure out the issue.

    You can also comment the line number 94 inside the product-variant-table-for-woocommerce > product-variant-table-for-woocommerce.php

    as the product variation table is not mobile responsive.

    Please make sure you have disabled this option.

    Hope to hear from you soon!

    Thank You

    Thread Starter kyleb08

    (@kyleb08)

    Hi Hakik,

    Would it be possible to discuss this with you over email as it may be quicker and easier to troubleshoot.

    The shortcode is basic: [wc_wishlists_button /]

    The button grabs the variation id and value using JS as seen below in the value – when the button is added to your code via shortcode this data and variation ID isn’t loaded:

    <input type=”hidden” name=”variation_id” class=”variation_id” value=”1130347″>

    Many thanks,
    Kyle

    • This reply was modified 3 years, 2 months ago by kyleb08.
    Thread Starter kyleb08

    (@kyleb08)

    This is what I need, I am not sure if you updated the hook to work like that?

    “I will update the filter hook so that you can set your wishlist by using variation id.”

    Plugin Author Hakik Zaman

    (@hakik)

    Hi @kyleb08

    I am really sorry for my late response. I was on my official tour and totally disconnected from the internet.

    Can you pass variation id (as parameter) using [wc_wishlists_button /] shortcode? For example- [wc_wishlists_button variation_id="%variation_id%"][wc_wishlists_button /]

    Hope to hear from you soon!

    Plugin Author Hakik Zaman

    (@hakik)

    Hi,

    It’s been a while I didn’t hear from you.

    So, I am changing this thread status as resolved.

    Don’t hesitate to create a new thread if you have any issues.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding various features’ is closed to new replies.