HOW TO ACTIVATE WOOCOMMERCE ADD TO CART BUTTON AND INCREASE WEBSITE SPEED IN TNM

NapitWPTech Theme Support Forums The NewsMag HOW TO ACTIVATE WOOCOMMERCE ADD TO CART BUTTON AND INCREASE WEBSITE SPEED IN TNM

This topic contains 11 replies, has 2 voices, and was last updated by  Bishal Napit 6 months, 2 weeks ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #404

    Wital
    Participant

    Hi,

    Mr. Bishal. The NewsMag Template is dynamite.

    Thank you.

    There are a few things that need solving.

    * Im unable to activate the “ADD TO CART” button in woocommerce. The standard way of activating does not work in your template.
    * After adding several widgets now my website is very slow. How do we speed it up? Even after configuring the plugin Autoptimize, Cloudflare CDN, and W3TC caching, it’s still too slow.

    Could you assist solving this?

    #405

    Bishal Napit
    Keymaster

    Hi Wital,

    I have not modified any of the WooCommerce template files at all via the theme. So, it probably need to work. Also, have you added the product price for those products too? If not added then, it may not show, so, can you once check and confirm the same?

    And for the last issue, you can try the plugin EWWW Image Optimizer as well as Lazy Load both available via the WordPress plugin directory for image delivery from your site?

    Thanks.
    Bishal Napit

    #406

    Wital
    Participant

    Thank you for the answers.

    My prices are working excellent.

    As you may know in order to activate the “ADD TO CART’ button:

    1.) Go to ‘functions.php’ and click on it.

    2.) Find this piece of code.

    * “remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );”

    3.) Simply delete ‘remove_action’ and replace it with ‘add_action’ or you can also just replace by copying the whole code given below.

    * “add_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );”

    In Step #2 the “remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 );” is not there. I went thru the whole code and still haven’t found this code string. Where did you put this code in the TNM Template? What #line is it on?

    #407

    Bishal Napit
    Keymaster

    Hi Wital,

    That code, which you are referring to, is not within the theme file at all. So, maybe, you can search on the files of used plugin in your site or deactivate the used plugin in your site and check for the same?

    Thanks.
    Bishal Napit

    #409

    Wital
    Participant

    That’s what I was saying Bishal.
    The steps I outlined is the standard way of activating the WooCommerce “ADD TO CART” button in templates because by Default it’s off.

    Since that standard code I shared we ALL use it to activate it.

    And your template does not have it.

    * How do we activate WooCommerce “ADD TO CART” button in your template?
    * What do we do?

    #410

    Bishal Napit
    Keymaster

    Hi Wital,

    Did you checked on deactivating the used plugin in your site? If not, then, can you once deactivate the used plugin in your site and check? Also, again, I would like to say that I have done done any specific work at all to remove the button you mentioned within the theme. I have made the theme compatible with WooCommerce plugin in this way: https://napitwptech.com/tutorial/wordpress-development/make-theme-woocommerce-plugin-compatible/, which only refers to changing the wrappers the products will be situated to.

    However, if you again want to overwrite the plugin setting, which may have caused it then, you can create the child theme: https://napitwptech.com/tutorial/wordpress-development/tutorial-creating-wordpress-child-theme/ and then do the required process in the functions.php file of the child theme. And since this is not theme specific issue, I may not be able to help you properly on this. Hope you can understand and is clear on this.

    Thanks.
    Bishal Napit

    #411

    Wital
    Participant

    I will check and see. Hope this works.

    #412

    Bishal Napit
    Keymaster

    Hi Wital,

    Ok. Do let me know if you have got any further query regarding to the theme. I will try to help you on those as far as possible.

    Thanks.
    Bishal Napit

    #413

    Wital
    Participant

    Bishal I fixed the issue.

    I didn’t have to create a child theme to do it.

    Plus! Sorry I made an ERROR. It’s not your TNM theme that’s slow it’s my webhost Hostgator. There not setup to host WORDPRESS websites.

    There’s 1 more situation.

    How do we get rid of the “POWERED BY WORDPRESS” credits in the footer of your TNM Theme? This is one of the things Hacker’s look for.

    #414

    Bishal Napit
    Keymaster

    Hi Wital,

    For changing the footer copyright information, if you can code that on your own then, you can do the same via the child theme.

    Thanks.
    Bishal Napit

    #415

    Wital
    Participant

    I will try it and see what happens. Talk to you soon.

    #416

    Bishal Napit
    Keymaster

    Hi Wital,

    However, if you want to remove the footer copyright information totally then, you can try the below CSS code in the Additional CSS Box provided via the Customizer Options and check:-

    .footer-copyright {
    	display: none;
    }

    Thanks.
    Bishal Napit

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.