Jump to content

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

Best Way To Customize Backend Rate Topic   - - - - -

 
  • screenimages
  • Advanced Member
  • Members
  • Join Date: 17-Jul 14
  • 128 posts

Posted 06 April 2017 - 03:19 PM #1

I'm currently creating a new theme for my multivendor shop and using a child theme - it's a nice, clean and simple approach to modifying the appearance of the shop, and makes upgrading cs-cart more straightforward.

 

However, there doesn't seem to be the same approach available to modifying the backend. As our shop is multivendor, my vendors need to be able to login to an environment tailored to their needs.

 

In the past we made hard code changes to templates and style sheets - very messy to upgrade.

 

What approach should one make to do this correctly in the backend?

 

 

(MVE 4.41)

 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 9,895 posts

Posted 06 April 2017 - 08:12 PM #2

It's pretty much hard wired without replacing the css and 'backend' in the design/backend file structure.

Back in the old days, you could choose a theme for frontend and a theme for backend (both were loaded from the var/themes_repository).  But they took that away and hard-wired the backend.

 

From an addon developer's perspective, it's great since things remain pretty stable/static.  However, it does mean that when changes occur, there's not much getting around them.

 

I guess you could override the design/backend/templates/index.tpl template and take it completely from there.  But note that when backend business logic changes, you would have to update your customizations to match those changes.  Good luck in supporting things like the theme editor and other JS intensive functionality defined in the backend but implemented in the frontend.

 

There are hooks for a lot of the admin templates, can't you do what you need by using those hooks and/or overriding the specific pages you want to modify?


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


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

Posted 07 April 2017 - 06:52 AM #3

Styles can be easily changed with the addons in the backend. As for template, is it really required to completely change any template for your needs?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • screenimages
  • Advanced Member
  • Members
  • Join Date: 17-Jul 14
  • 128 posts

Posted 19 April 2017 - 03:34 PM #4

Most of what we've changed on the backend is to simplify the options available to vendors when creating products - this we accomplish with stylesheets change.

 

(Is there a prescribed way to add an additional style sheet that will not get nuked when we run upgrades? I guess we could continue to drop it into the backend styles.less and then restore when it upgrades - but that just adds to the list of things to remember to do.)

 

However we've also added some extra tables for the vendor profiles that allow them to customize the way their store looks (some extra graphics/info).

 

I guess I'm just not clear about what the upgrade/install process does to the existing file system - whether I have to backup and replace everything, or if folders like my_changes and the like are left untouched. Writing add-ons has proved elusive for us.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 9,895 posts

Posted 19 April 2017 - 07:07 PM #5

Generally one would use the my_changes addon and use the styles.post.tpl hook to identify the custom stylesheet usually in the css directory of the addon.  I.e.

design/backend/css/addons/my_changes/styles.css

and

design/backend/templates/addons/my_changes/hooks/index/styles.post.tpl

 

You can read the integration guide to get details or look at other addons in the system.  You'll find more styling examples in the frontend directory than the backend.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • screenimages
  • Advanced Member
  • Members
  • Join Date: 17-Jul 14
  • 128 posts

Posted 20 April 2017 - 08:51 PM #6

Once again - Tony cuts through the chaff - thanks!



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 9,895 posts

Posted 20 April 2017 - 08:56 PM #7

Once again - Tony cuts through the chaff - thanks!

Now if that could only translate to $$! :-)


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • screenimages
  • Advanced Member
  • Members
  • Join Date: 17-Jul 14
  • 128 posts

Posted 20 April 2017 - 11:36 PM #8

Might be able to do something about that - we're in redevelopment mode. We will need "new things"…

 

 

cheers