Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Disable Addon For Storefront Rate Topic   - - - - -

 
  • natewallis
  • Advanced Member
  • Members
  • Join Date: 11-Jan 13
  • 148 posts

Posted 06 August 2018 - 04:58 AM #1

Hi, 

 

I found this old topic, 

 

https://cscart.userv...ore-not-a-globa

 

But I am not sure how to achieve what I want to do with CSCART. 

 

I am currently in the middle of developing a new theme for our storefront.  We are running multiple storefronts.  As part of my new theme, I have created a new addon (just for this theme). 

 

There are some controllers in the new theme addon that I don't want running for my legacy themes. 

 

I realise in that thread you can control settings for an addon per storefront, but this would not stop the PHP controllers running. 

 

Any ideas?  Thanks.. 



 
  • oleg.gorshkov
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 06-Dec 13
  • 3146 posts

Posted 06 August 2018 - 05:04 AM #2

Hi, 

 

I found this old topic, 

 

https://cscart.userv...ore-not-a-globa

 

But I am not sure how to achieve what I want to do with CSCART. 

 

I am currently in the middle of developing a new theme for our storefront.  We are running multiple storefronts.  As part of my new theme, I have created a new addon (just for this theme). 

 

There are some controllers in the new theme addon that I don't want running for my legacy themes. 

 

I realise in that thread you can control settings for an addon per storefront, but this would not stop the PHP controllers running. 

 

Any ideas?  Thanks.. 

 

Hello!

 

You can create an add-on setting and enable it only for the storefronts with the new theme. In the controllers you can add a condition:

if (Registry::get("addons.addon_name.setting_name") == 'Y') {

}

Simtech Development | sales@simtechdev.com | www.simtechdev.com
CERTIFIED CS-CART PARTNER | LICENSES | DEVELOPMENT | ADD-ONS | DESIGN | UPGRADE

Mega SEO Package - All you need for your SEO


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18495 posts

Posted 06 August 2018 - 06:27 AM #3

As alternative, you can use conditions by current theme

 

if (Registry::get("runtime.layout.theme_name") == 'bright_theme') {
    ....
}
 
Hope it will help you

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.