• Resolved dblinks

    (@dblinks)


    I’m looking forward to using this plugin on all our charitable client pages.

    I’m not exactly sure if the “Variable Product” used with your plugin and the Avada theme is conflicted by the templates in Avada or another issue.

    Findings:

    Variable Woo Product Issue

    3591263#0: *100733 FastCGI sent in stderr: "PHP message: PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/mydomain.org/httpdocs/wp-content/themes/Avada/templates/wc-after-single-product-summary.php on line 37" while reading response header from upstream

    I understand if my client needs further customization not available through your support we can make adjustments based on your recommendations.

    Separate Issue: We are finding with your shortcodes when trying to render checkouts in (for instance) a 1/3 column the Avada theme is too wide because of it’s intended layout printing 2 columns in the name/address area.

    I can certainly reachout to Avada for assistance but wanted to start here for your expert opinion regarding our variable product issue.

    Thank you Jonas,
    Stuart

    • This topic was modified 2 years, 7 months ago by dblinks.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jonas

    (@flinnn)

    Hi Stuart,
    thanks for using Donation Platform for WooCommerce.
    Unfortunately, since the Avada theme is a premium theme, I have no way to test compatibility.
    However, the problems are relatively easy to explain:
    Both Donation Platform for WooCommerce and the Avada theme use the hooks provided by WooCommerce to customize the functionality and design of the shop. Apparently, Avada uses a higher priority and thus overwrites the changes from the donation plugin.
    You can try the following code, it should ensure that the template overwrite works properly:

    add_filter( 'wc_get_template', function(string $template, string $template_name, $args, string $template_path, string $default_path) {
    	$path = WCDP_DIR . 'includes/wc-templates/';
    	switch ($template_name) {
    		case 'single-product/add-to-cart/simple.php' :
    		case 'single-product/add-to-cart/variable.php' :
    		case 'single-product/add-to-cart/grouped.php' :
    			if(WCDP_Form::is_donable(get_queried_object_id())) {
    				$template = $path . 'single-product/add-to-cart/product.php';
    			}
    		default:
    			break;
    	}
    	return $template;
    }, 100, 5 );

    You can also take a look at all the hooks used by Donation Platform for WooCommerce: https://github.com/jonas-hoebenreich/wc-donation-platform/blob/69b7ad61fa64f2fdea2b535e55526d71d6a66043/includes/class-wcdp-hooks.php

    The problem with the columns is probably due to conflicting CSS. There is nothing else to do than to find the problems in the console and overwrite the wrong styles of Avada.

    Best,
    Jonas

    Thread Starter dblinks

    (@dblinks)

    Hi Jonas,

    This worked perfectly. Thanks for taking the time to sort it out so efficiently & accurately.

    Have a great weekend.

    Stuart

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Variable Product Issue’ is closed to new replies.