• Resolved ejjl

    (@ejjl)


    Hi there!

    Thanks for the plugin – I found it today and I’m testing it.

    I set up a downloadable product and all seems fine. When I view the product page, and click “Download”, there is a little animation, and then a link appears next to the “Download” button saying “View Cart”.

    However, I am not presented with a download dialog window.

    When I disable the OceanWP theme, the download works fine.

    Any idea where the problem might lie? I don’t really know where to start looking.

    Cheers!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter ejjl

    (@ejjl)

    Update: The plugin works with the OceanWP theme.

    It doesn’t function with my child theme of the same.

    It does not even work when I delete every single file in the child folder, except for style.css and an empty functions.php.

    Plugin Author Richard Webster

    (@rwebster85)

    Hi mate try adding the shortcode to the product description.

    [download_now_page]

    Thread Starter ejjl

    (@ejjl)

    Hi there,

    Same issue. Button behaves the same, and no download dialogue.

    When you click the button, a circular “I am busy doing something”-animation appears on the button. And then it all stops. Just no save file dialogue.

    I’m confused as to what’s the difference between the clean OceanWP theme, and a blank child theme..

    Thread Starter ejjl

    (@ejjl)

    Okay, I found that installing the child theme anew in a new directory (different name) did work. I will dig deeper into this tomorrow.

    Cheers so far!

    Plugin Author Richard Webster

    (@rwebster85)

    Hmm interesting find mate. Do you mean it works with or without the shortcode? Keep me posted.

    Thread Starter ejjl

    (@ejjl)

    Hi Richard,

    After digging around, I found the following:

    With the OceanWP theme enabled:

    When Enable Ajax Add To Cart is enabled in “Appearance > Customize > WooCommerce > Single Product”, the download does not work. With that disabled, it works.

    I guess that’s the culprit. What can be done about this?

    Thanks heaps for your time and help!

    • This reply was modified 4 years, 8 months ago by ejjl.
    Plugin Author Richard Webster

    (@rwebster85)

    Hi mate I have an idea. Is this site online so I can check the product page myself? I want to see the download button and look at the code being used on the page.

    Edit: I don’t need access to the backend or anything, just a link to see the product page in action.

    Thread Starter ejjl

    (@ejjl)

    Yeah, have a look here: https://goodshepherdtoys.com/product/test-test-free-download/

    Thanks!

    P.S.: Just installed it on a prod website, as the testing one is log-in only.

    Plugin Author Richard Webster

    (@rwebster85)

    Thanks mate I’ll check it tomorrow. Hopefully I can find a workaround for you.

    Thread Starter ejjl

    (@ejjl)

    That would be awesome! Thanks for your time and effort! Much appreciated (:

    Thread Starter ejjl

    (@ejjl)

    Hi Richard,

    Here is a new link for testing: https://goodshepherdtoys.com/gst-staging-3432-/?product=test-test-free-download

    The other link on the production site is actually working now, as I disabled Ajax -add-to-cart temporarily (I needed the download to work already).

    I hope that your idea works and that this issue can be fixed, so that I can re-enable Ajax-add-to-cart ??

    Thanks!

    Plugin Author Richard Webster

    (@rwebster85)

    Thanks mate, leave it with me.

    Plugin Author Richard Webster

    (@rwebster85)

    If you have the facility to add custom JavaScript code to the site, either manually or using a plugin, the following code should make it work.

    $( document ).ready( function() {
    	$( '.somdn-download-form .somdn-download-button' ).each(function() {
    		$( this ).removeClass( 'single_add_to_cart_button' );
    	});
    });

    Basically the theme script code hooks into the download button because it has the class single_add_to_cart_button. This class is added to ensure correct styling, but having removed it using the Chrome developer console the style seems to stay the same. So if we remove that class when the page has loaded, it should prevent the problem from occurring.

    Plugin Author Richard Webster

    (@rwebster85)

    Alternatively, and probably the better way, would be to amend the classes in PHP before the button is ever displayed. This should bypass any possible issues caused using the above script.

    Add the following to your site somewhere, preferably using a plugin that lets you add custom PHP functions to your site.

    add_filter( 'somdn_get_button_classes', 'somdn_get_button_classes_woo_ocean', 20, 1 );
    function somdn_get_button_classes_woo_ocean( $class ) {
    	return ' button';
    }
    Thread Starter ejjl

    (@ejjl)

    Hi Richard,

    That fixed it! You’re a mighty fine chap ?? Where can I buy you a beer?

    I added your snippet to functions.php in my child theme, re-enabled the Ajax add to cart thingy, refreshed the whole lot, and it is working! Amazing!

    Thank you so much for your time and effort! I hope you enjoyed the puzzling ??

    Cheers!
    Edmund

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘With OceanWP theme, no download’ is closed to new replies.