CS Cart or thorns to a black hole of crutches and optimizations

Most recently, I became a CS Cart add-on developer. It happened by chance: I was hired to work in the St. Petersburg network of online stores selling vapes and all sorts of interesting things to meet the physical needs of suffering couples and singles (who did not understand - not yet matured). Both online stores are deployed on two storefronts with different domains, but one admin panel and a common database. What's wrong with her? I think a lot has been written about CMS, but I will add my fly in the ointment.





Journey to the module through the forest of directories

In the process of developing the first module for this platform, I faced many problems, which, as I thought, having experience with OOP, as well as with CMS MODX Revo, should not exist. The first thing that caught my eye was the very complex and confusing structure of the module:





root/
├─ app/
│  └ addons/                                     <-   
│    └ [id_]/                              <-  
│       ├─ controllers/                          <-  
│       │  ├─ backend/                           <-  
│       │  │  ├─ [_].php            <-  
│       │  │  ├─ [].pre.php            <-   
│       │  │  └─ [].post.php           <-   
│       │  ├─ common/                            <-  
│       │  │  ├─ [_].php
│       │  │  ├─ [].pre.php
│       │  │  └─ [].post.php
│       │  └─ frontend/                          <-  
│       │     ├─ [_].php
│       │     ├─ [].pre.php
│       │     └─ [].post.php
│       ├─ database/                             <- MySQL 
│       ├─ schemas/                              <-  PHP 
│       │  └─ [_]/                      <-   ( )
│       │     └─ [_].post.php       <-   
│       ├─ Tygh/                                 <- 
│       │  ├─ Shippings/                         <- 
│       │  │  └─ Services/                       <-  
│       │  │     └─ [].php         <-   
│       │  └─ [].php                     <-   
│       ├─ addon.xml                             <-   
│       ├─ config.php                            <- 
│       ├─ func.php                              <-    
│       └─ init.php                              <-  
├─ design/
│  ├ backend/                                    <-   
│  │ ├ css/                                      <-   
│  │ │ └ addons/
│  │ │   └ [id_]/                          <-  
│  │ │     ├ styles.css                          <-  
│  │ │     └ styles.less
│  │ ├ mail/                                     <- Email   
│  │ │ └ templates/
│  │ │   └ addons/                               <-   
│  │ │     └ [id_]/                        <-  
│  │ │       ├ hooks/                            <-   
│  │ │       │ └ [_]/                     <-  
│  │ │       │   ├ [_].pre.tpl       <-   
│  │ │       │   ├ [_].post.tpl      <-   
│  │ │       │   └ [_].override.tpl  <-  
│  │ │       ├ [_]_subj.tpl/
│  │ │       └ [_].tpl/
│  │ ├ media/                                    <-  
│  │ │ └ images/
│  │ │   └ addons/
│  │ │     └ [id_]/                        <-   
│  │ │       ├ _1.jpg/
│  │ │       └ _2.png/
│  │ └ templates/                                <- 
│  │   └ addons/
│  │     └ [id_]/
│  │       ├ hooks/                              <-   
│  │       │ ├ index/                            <-  
│  │       │ │ ├ scripts.post.tpl                <-    
│  │       │ │ └ styles.post.tpl                 <-    
│  │       │ └ [_]/
│  │       │   ├ [_].pre.tpl         <-    
│  │       │   ├ [_].post.tpl        <-    
│  │       │   └ [_].override.tpl    <-    
│  │       ├ views/                              <-  
│  │       │ └ [_]/                 <- 
│  │       │   └ [_].tpl         <-  (mode) 
│  │       └ overrides/                          <-   
│  │         └ ...                               <-   
│  │
│  └ themes/                                     <-   — 
│    └ [_]/                          <-  
│      ├ css/                                    <- 
│      │ └ addons/
│      │   └ [id_]/
│      │     ├ styles.css                        <-   CSS
│      │     └ styles.less                       <-   LESS
│      ├ mail/                                   <-    
│      │ └ templates/
│      │   └ addons/
│      │     └ [id_]/
│      │       ├ hooks/                          <-   
│      │       │ └ [_]/
│      │       │   ├ [_].pre.tpl
│      │       │   ├ [_].post.tpl
│      │       │   └ [_].override.tpl
│      │       ├ [_]_subj.tpl/       <-   
│      │       └ [_].tpl/            <-  
│      ├ media/                                  <-  
│      │ └ images/
│      │   └ addons/                             <-  
│      │     └ [id_]/
│      │       ├ _1.jpg/
│      │       └ _2.png/
│      └ templates/                              <- 
│        └ addons/
│          └ [id_]/                        <-  
│            ├ hooks/                            <-  
│            │ ├ index/                          <-  
│            │ │ ├ scripts.post.tpl              <-    
│            │ │ └ styles.post.tpl               <-    
│            │ └ [_]/                     <-  
│            │   ├ [_].pre.tpl       <-    
│            │   ├ [_].post.tpl      <-    
│            │   └ [_].override.tpl  <-   
│            ├ views/                            <-  
│            │ └ [_]/               <-   
│            │   └ [_].tpl       <-    
│            └ overrides/                        <-    
│              └ ...                             <-    
├ js/                                            <-  
│ └ addons/
│   └ [id_]/
│     └ func.js/
└ var/                                           <-   
  └ themes_repository/                           <-   
    └ [_]/
      └ ...
      
      



, , , , , , . : , AJAX , CMS JS , . , , 3-4 -, , , .





, , , .





- ,

, , . , , , , : " ?!" - Google LightHouse, , 20 10 , . . , CMS - , , PHP, , , . ? - : CMS 2003-2004 , MyISAM.





MyISAM - , 50 000 (!) ( ). , , InnoDB. - 500 - 1000 .





. 50 000 ? " " - . , SEO . . : . , , . , , . , "" -.





- , , , .





? 100

, - "". cron - . , , - . , - . , , 100$ . , , , , , CMS . CMS, , , , , , , .





Conclusion

I do not believe that the situation with this CMS will ever change and I really feel sorry for those who, having a huge nomenclature base, sit on it and pay fabulous money for all the finishing touches. But I want to believe that, at least in my store, I will be able to overcome some of its shortcomings.





I hope the article was interesting to you. I will write more about my research in this CMS or about the development of modules for it.








All Articles