Local Configuration Addon (update)

[COLOR=“Red”]8/10/09[/COLOR]

Changed the link location for acquiring the addon. It can now be obtained only via [url]http://www.ez-ms.com/addon_products/local-configuration-addon.html[/url]. This will allow me to keep track of who is using it so I can provide update information when it is available.



[COLOR=“Red”]7/22/09[/COLOR]

Created a document that more fully describes using this addon for local customization. It is written in the context of my product offering but the information is general enough to be used by all.[url]http://www.ez-ms.com/docs/customizing_your_store.pdf[/url]



My original post was off in the 2.0 Trial forum so I simply moved the update here. The original post can be viewed at [url]http://forum.cs-cart.com/showthread.php?p=47011#post47011[/url]



[COLOR=“Red”]Update[/COLOR] (7/9/09)



I did some work for a client recently that lent itself very nicely to this addon. So, in the spirt of community I created a new version that is free for use. It is located at: [url]http://www.ez-ms.com/addon_products/local-configuration-addon.html[/url]



New features are:


  1. Can now specify a CSS directory within the addon directory structure so all your css is in one nice neat place. By default, it is set to ‘css’ which would look for css files in skins/customer/addons/local/css The default stylesheet that will be loaded after the system styles.css is called local_styles.css. It is present with some comments but otherwise empty.


  2. You can now have the system load a stylesheet that is specific to the controller being viewed. I.e. if you want to customize the checkout page then you’d have a stylesheet present called:

    skins/customer/addons/local/css/checkout.css

    If you want to override the categories styles then you’d have:

    skins/customer/addons/local/css/categories.css

    Note that these “controller specific stylesheets” are loaded AFTER both the system stylesheets and the local_styles.css files. Hence they can be VERY specific to a page.



    These extensions were pretty quick and easy to do and I think they add a lot of flexibility to the addon enabling you to make local modifications and a custom look & feel without modifying standard template files. Hence, when you upgrade to 2.0.whatever you won’t have any conflicts.



    Have fun!



    (Also note that if you would like [COLOR=“Red”]Buy Now [/COLOR]capability, I have an addon that does so for sale at: [url]http://www.ez-ms.com/buy-now-button.html[/url] Text of the button is configurable.)





    [COLOR=“Red”]End of Update[/COLOR]

I wonder how this will compare to the “My changes” add-on which zeke described as:

[QUOTE]This addon allows you to customize your store without changing core scripts/templates to avoid problems with future upgrades.[/QUOTE]



Bob

The more I experience the cart, I beleive that is exactly what the “My Changes” is for. I am not sure exactly how it works but I was trying to edit the sorting.tpl from the server side and the changes would not take affect. When I editted the file using the Design mode, the changes were reflected immediately.

It seems like what is missing is a control panel where you can see all your changes.



I also wonder whether there will be a tool to help identify problems between local changes and changes in the upgrades.



Bob

[quote name=‘jobosales’]I wonder how this will compare to the “My changes” add-on which zeke described as:

Bob[/QUOTE]

Wow, they actually listened and provided something (not much, but something)!!!



The ‘my_changes’ addon simply provides an addon.xml file. There are no skin directories or templates or hooks that I can see. There is no reference to the addon in any of the source base so editing of template files in design mode still makes changes to the standard templates causing future upgrade conflicts.



Thie ‘local’ addon provides the basic structure and provides for the incorporation of localized css files so that a designer can simply go in and redefine the css classes they choose. The structure for hooks is also in place where you can easily add them.



Maybe zeke has future plans for the my_changes addon but right now it just looks like a placeholder.

[quote name=‘jobosales’]It seems like what is missing is a control panel where you can see all your changes.



I also wonder whether there will be a tool to help identify problems between local changes and changes in the upgrades.



Bob[/QUOTE]



Not quite sure I understand the question…



A control panel could be provided (but I’m not willing to invest for free software) that would identify any hooks or pre/post/override controller files within the addon.



I would hope that anything that changed in a ‘hook’ would have compatibility taken into account.

[quote name=‘tbirnseth’]A control panel could be provided (but I’m not willing to invest for free software) that would identify any hooks or pre/post/override controller files within the addon.[/QUOTE]

I was thinking that the control panel would be provided as a front end in the “My changes” add-on which, as you noted, appears to be a placeholder at this point.



Bob

Buy now addon was okay but it is expensive :frowning:

[quote name=‘miracles’]Buy now addon was okay but it is expensive :([/QUOTE]

Oh well, have to recover my costs somewhere… Think about if you went to implement it. How much time would it take you? Then divide that into the cost and see what rate your’re willing to work for. :slight_smile:



It is what it is… If one has the need then one needs to determine where the cost is justified for their need.

[quote name=‘tbirnseth’]Oh well, have to recover my costs somewhere… Think about if you went to implement it. How much time would it take you? Then divide that into the cost and see what rate your’re willing to work for. :slight_smile:



It is what it is… If one has the need then one needs to determine where the cost is justified for their need.[/QUOTE]



What exactly does it do? I was looking for a buy now button that would take customer directly to paypal website (express checkout). It would be an addition to add to cart button.

[quote name=‘tbirnseth’]Oh well, have to recover my costs somewhere… Think about if you went to implement it. How much time would it take you? Then divide that into the cost and see what rate your’re willing to work for. :slight_smile:



It is what it is… If one has the need then one needs to determine where the cost is justified for their need.[/QUOTE]

Hi man, thanks for your great addon.



But I strongly suggest that you should change your “menu” z-index value so that the menu won’t cut through the popup image.

[quote name=‘Darius’]What exactly does it do? I was looking for a buy now button that would take customer directly to paypal website (express checkout). It would be an addition to add to cart button.[/QUOTE]



Th buy now addon does the following:

  1. Allows you to define the text of the button
  2. Allows you to have an “add to cart” and/or “buy now” button or both



    It utilizes the styling setup for the add to cart button.



    It works as follows:

    When the buy now button is clicked, the user is take directly to the checkout page where the buy now item has been added to the cart. The normal “login” part is skipped if the user is an anonymous user, otherwise if they are logged in their credentials are used. The user then goes through the checkout process (steps dependent upon whether they are logged in or not). Another feature is the ability to return to the page they came from at completion of checkout (whether that’s on-site or from a link on an advertisement). The functionality is there, it just requires an additional parameter in the javascript link if coming from an off-site location.

Updated info with link to PDF documentation. Includes a list of all ‘hooks’ as of v2.0.6.



While the document is geared toward my product offering, the information is applicable to any store.



Link to documentation is: [url]http://www.ez-ms.com/docs/customizing_your_store.pdf[/url]

Link to addon is: [url]http://www.ez--ms.com/local_addon_v2.tgz[/url]

Hi Tbirnseth,



I’ve been using your local addon to update my store via the hooks feature. I am now trying to change just the categories and subcategories product layout without effecting other pages (it multicolumn template seems to also affect the related products on the product pages). I read your post above on the “css per controller stylesheet” feature added to the local addon. This is exactly what I need, but for some reason my local addon installation doesn’t seem to be picking up the categories.css file I created.



My local add-on is at /store/skins/basic/customer/addons/local/hooks



I’ve tried setting up:

/store/skins/basic/customer/addons/local/hooks/css/categories.css

/store/skins/basic/customer/addons/local/hooks/categories.css

/store/skins/basic/customer/addons/local/categories.cs



The "main’ css override for the customer view is at:

/store/skins/basic/customer/addons/local/hooks/index/css

So I also tried adding the categories.css there as well with no luck.



It hasn’t worked, can you please clarify:

  1. Do I need to do anything other than upload my css file to the correct location for this feature to “activate”.


  2. Is there a specific naming convention or folder path I must follow (your post seemed like I just used controller_name.css and put it in a /css subfolder of the local addons location)


  3. In a seperate post ([url]http://forum.cs-cart.com/showthread.php?t=16554&highlight=smarty+if+then+page[/url]) you said that "if you enable this option you should install an empty file for every controller otherwise you’ll get a noisy error_log about “file not found”. Can you point me to a list of the controllers? I’ve searched the forums and knowledgebase to no avail and unfortunately am new to controllers so I don’t know which/how many CS-cart uses?

In the addon’s settings, you need to have the checkbox ‘use controller specific CSS’ checked. This will cause skins//customer/addons/local/hooks/index/styles.post.tpl to add a link to a file named skins//customer/addons/local/css/.css where ‘’ is the name of the controller being used.



In your case, the ‘’ is ‘categories’. So you need a file named:

skins//customer/addons/local/css/categories.css (this also assumes that in the addon settings that you have ‘css’ as the directory where CSS files are located).



You might have to flush your browser’s cache depending on the values in your categories.css file. But probably not. I would use Firebug in ‘NET’ mode to see whether the file is getting loaded or not. You can also view source in your browser and look for a ‘


A llist of possible controllers can be obtained by the list of php files in the /controllers/customer directory. I.e. auth.php equates to auth.css.

Thank you Tbirnseth.



I went into administration–>addons and see “Local Modifications” (the “edit” link is greyed out). Is the "checkbox ‘use controller specific CSS’ you mentioned located somewhere else?



There is also a "My Changes’ addon listed. Both addons are active and have their "edit’ links greyed out.



I am using CS-Cart version 2.0.10. I don’t see how to get the local addons version, but the readme.txt file in the addons/local folder I installed it under is dated 1-9-2010.

The ‘edit’ link shouldn’t be grayed out. That would indicate a problem in parsing the addons/local/addon.xml file or a mismatch between the ‘settings’ stored for the addon and what’s in the addon.xml…



If you are NOT currently using the addon, I would suggest that you uninstall and then install again. It seems you might have a bad version or some corruption has occured somewhere along the line…



Uninstalling/reinstall will cause the ‘settings’ to be removed and recreated. If there’s still a problem, check your PHP error_log file or PM me and give me access to your site and I’ll figure it out.



The current version is 2.0.4 which can be obtained here: [url]http://www.ez-ms.com/private/local_v2.0.4.tgz[/url]

i found the addons files at:

/store/addons/local



This is the contents of the addon.xml file:





local

Local Modifications

1

0

active





Local Modifications







The config.php file contains:


/*****************************

* Copyright 2009, 1st Source IT, LLC

* All rights reserved.

* Permission granted for private and commercial use as

* long as this copyright notice, associated text and

* links remain in tact.

*

* [url]http://www.ez-ms.com[/url]

* [url]http://www.ez-om.com[/url]

* [url]http://www.1sit.com*[/url]

*

* End copyright notification

*/



/*

* config.php

*

* Add any defines for configuring your addon

*/

?>

Right now our entire store design and changes are accomplished thru the addon and override hooks, so I'm leary to reinstall / modify the files on my own without guidance. If you know of a way to edit the config manually to activate the styles feature I'll try that. Alternately, if the 2.0.4 version you mentioned is newer than the one I have installed and a safe upgrade can be accomplished maintaining our changes, that would be preferred and I would like to pay you to complete the upgrade for us so we can be sure the addon is current, working properly and our changes are maintained. Please PM me with information on the cost and how to submit payment and login credentials for the store & FTP so you can do this. If neither option (editing the config or an upgarde) are safely doable, please quote me for what we can do. Thanks.

tbirnseth,

am I right in assuming that the addon you’re describing, could solve my problem, as described here : [url]http://forum.cs-cart.com/showthread.php?p=105793#post105793[/url] ?