-
Posts
409 -
Joined
-
Last visited
-
Days Won
109
Content Type
Profiles
Forums
Blogs
Store
Downloads
Gallery
Everything posted by ClicShopping
-
Configuration Introduction The main installation configuration parameters are stored in the following locations: Type Location Global Core/ClicShopping/Conf/global.php Shop Core/ClicShopping/Sites/Shop/site_conf.php Shop Core/ClicShopping/Sites/ClicShoppingAdmin/site_conf.php The global configuration file and all site configuration files are automatically loaded into their own groups when the framework is initialized. The global configuration file is loaded into a 'global' group, and the site configuration files are loaded into their own Site group (eg, 'ClicShoppingAdmin', and 'Shop'). Reading a configuration value is first attempted at the Site level, and if the configuration key does not exist, the global value is returned. A Site level configuration parameter has priority over a global level parameter if a global level configuration parameter is also defined. Custom Configuration Files It's possible to create custom configuration files that have priority over the values from the core configuration files. Custom configuration files can be stored in the following locations: Type Location Global Core/ClicShopping/Custom/Conf/global.php Per-Site Core/ClicShopping/Custom/Sites/SITE/site_conf.php Configuration File Format The format of the configuration parameters are stored in a "ini" style format in a PHP file that is assigned to a $ini PHP variable. This style of configuration was chosen over a plain text .ini file to prevent configuration parameters being read in cases of the configuration files being publicly accessible through the web server. An example format for the global configuration file is: <?php $ini = <<<EOD db_server = "localhost" db_server_username = "dbuser" db_server_password = "dbpass" db_database = "my_db_name" db_table_prefix = "clic_" store_sessions = "MySQL" time_zone = "Europe/Berlin" EOD; An example of a Site configuration file is: <?php $ini = <<<EOD dir_root = "/www/html/" http_server = "https://demo.shop" http_path = "/" http_images_path = "images/" http_cookie_domain = ".clicshopping.shop" http_cookie_path = "/" EOD; External Configuration Files External configuration files can be loaded using the following code: use ClicShopping\OM\CLICSHOPPING; CLICSHOPPING::loadConfigFile($path_of_file, 'ext_group'); This would load the configuration parameters of $path_of_file to the 'ext_group' configuration group. It is important that the ini format is stored as a string to the $ini PHP variable otherwise the configuration parameters can not be parsed. Retrieving Configuration Parameters Configuration parameters can be retrieved using CLICSHOPPING::getConfig(): use ClicShopping\OM\CLICSHOPPING; $value = CLICSHOPPING::getConfig('cfg_name'); In this example, the cfg_name configuration parameter from the current Site group is returned. If the current Site group does not contain the configuration parameter, the global group value is returned. It's possible to define which group the configuration parameter should be loaded from by defining the group name: use ClicShopping\OM\CLICSHOPPING; $value = CLICSHOPPING::getConfig('cfg_name', 'ext_group'); This would load the cfg_name configuration parameter from the ext_group group. The following can be used to first see if a configuration parameter exists: use ClicShopping\OM\CLICSHOPPING; if (CLICSHOPPING::configExists('cfg_name')) { .... } This will check if cfg_name exists in the current Site group or the global group. Checking to see if a configuration parameter exists in a specific group is performed as follows: use ClicShopping\OM\CLICSHOPPING; if (CLICSHOPPING::configExists('cfg_name', 'ext_group')) { .... } Please note that if the configuration parameter does not exist in the specified group, a check is also performed in the global group. Setting Configuration Parameters Runtime configuration parameters can be set as follows: use ClicShopping\OM\CLICSHOPPING; $value = true; CLICSHOPPING::setConfig('is_true', $value, 'ext_group'); If no group is specified in the third parameter, the configuration parameter would be set in the global group. This function does not save the configuration parameter to the configuration file - it only sets a runtime configuration parameter value.
-
ClicShopping\OM is a framework utilizing new features in PHP to improve the performance, security, and modularity of the codebase. Taking advantage of namespaces and autoloading, it is now even easier to add new features and extend existing features without the need to edit core source code files. The base framework is located in the Core/ClicShopping directory: Framework Namespace Location Core ClicShopping\OM Core/ClicShopping/OM Sites ClicShopping\Sites Core/ClicShopping/Sites Apps ClicShopping\Apps Core/ClicShopping/Apps Custom ClicShopping\Custom Core/ClicShopping/Custom Namespaces/Autoloader The framework is built utilizing the PSR-4 standard for autoloading classes from matching namespaces and file paths. Classes are automatically loaded on demand and don't need to be included/required manually. The base namespace the autoloader watches for is ClicShopping\ and loads the class files located in the Core/ClicShopping/ directory. Examples Class File Location ClicShopping\OM\CLICSHOPPING Core/ClicShopping/OM/CLICSHOPPING.php ClicShopping\OM\Db Core/ClicShopping/OM/Db.php ClicShopping\OM\Registry Core/ClicShopping/OM/Registry.php ClicShopping\Sites\Shop\Shop Core/ClicShopping/Sites/Shop/Shop.php ClicShopping\Apps\VENDOR\APP\APP Core/ClicShopping/Apps/VENDOR/APP/APP.php Classes in the framework must declare their namespace as the first PHP code in the file. Examples namespace CLICSHOPPING\OM; class NewClass { .... } The full namespace to the above example would be: ClicShopping\OM\NewClass and the location of the file would be: Core/ClicShopping/OM/NewClass.php For another class to be able to load ClicShopping\OM\NewClass automatically, it needs to be declared with PHP's use keyword after the namespace of the class and before any other PHP code. Examples namespace ClicShopping\OM; use ClicShopping\OM\NewClass; class AnotherNewClass { public function __construct() { $NewClass = new NewClass(); } } The framework autoloader (ClicShopping\OM\CLICSHOPPING::autoload()) is registered as an autoloader in Coreincludes/application_top.php and is automatically initialized in all main PHP files that include the application_top.php file. Template files do not need to have a namespace set, but still need to reference framework classes that it uses: Examples use ClicShopping\OM\HTML; echo HTML::outputProtected('Hello World!'); More information about namespaces can be found at the PHP Namespace documentation page. Sites Sites are registered in the framework to initialize and apply environment parameters specific to that site. The available sites in the core are: Site Controller Shop (default) ClicShopping\Sites\Shop\Shop Admin ClicShopping\Sites\ClicShoppingAdmin\Admin Sites are registered and retrieved as follows: use ClicShopping\OM\CLICSHOPPING; CLICSHOPPING::initialize(); CLICSHOPPING::loadSite('Shop'); $site = CLICSHOPPING::getSite(); Custom Directory To customize a core source file, copy it to this directory matching the directory structure of the original file. For example, - to make custom changes to ClicShopping/OM/Session/File.php - copy the complete file to ClicShopping/Custom/Session/File.php and perform your changes to this new file. Notes Although the custom class is copied to a Custom directory, it must retain the original Core namespace. Due to this, copied classes cannot extend the original class in the Core namespace. ClicShopping\Custom\Conf Configuration setting ClicShopping\Custom\Sites\Shop (default) Shop classes ClicShopping\Custom\OM OM classes ClicShopping\Custom\Schema Database file installation Apps Apps are self-contained packages that add new or extend existing features through modules and hooks. Apps reside in their own directory and do not need to edit core source code files. Apps are located in the following directory: Namespace Location ClicShopping\Apps\VENDOR\APP Core/ClicShopping/Apps/VENDOR/APP Apps also have a public directory for public accessible files such as stylesheets, javascript, and images, located at: public/Apps/VENDOR/APP More information is available in the Apps chapter. Service Services are portions of the online store that do not directly relate to the customer purchasing a product, but can be helpful in setting up the store. Services are available in Shop and ClicShoppingAdmin. it can use everywhere inside the site. Example Service for the mail namespace ClicShopping\Service\Shop; use ClicShopping\OM\Registry; use ClicShopping\OM\Mail as MailClass; class Mail implements \ClicShopping\OM\ServiceInterface { public static function start() { if (is_file(CLICSHOPPING_BASE_DIR . 'OM/Mail.php')) { Registry::set('Mail', new MailClass()); return true; } else { return false; } } public static function stop() { return true; } } How to call inside a file : $CLICSHOPPING_Mail = Registry::get('Mail');
-
Change theme is easy, first you must install a new theme in the template directory and after in administration, you can change the theme in you Design configuration
- 2 replies
-
- installation
- theme
-
(and 1 more)
Tagged with:
-
A few people here asked that we have a thread on Adwords, so I'll start it. I've used Adwords since 2003 when you could do a nickel a click. Then, it became a dime and the race was off. Over time I've learned a lot and had a love/hate relationship. This year Adwords account managers have helped me in updating and learning new features. Currently, my ROI is the best it's been in at least a very long time, so I’ll try to share some ideas. For me, a big key is getting a repeat customer, but I also get some good sales from it. First, you need to tie in Analytics, which is now part of Adwords. Analytics can show you what sales you are getting through different ads and you can get the actual order id. This helps in adjusting ads or even stopping those that don't pay off. I look a lot at last 7 days and 30 days. The 7 day view is good because you can see how small bid adjustments can cost a lot. This can be done in the Adwords screens too. https://adwords.google.com/analytics/ And using a Google Feeder like Jack's, you need to set up with Google Shopping. I was slow to get this going, but it's really working well on some items I sell. This gets you the ad boxes you see with pics at the top of Google as well as Google Shopping. https://merchants.google.com/ That covers the basics but AdWords and Analytics have a lot of features. The biggest thing with AdWords is the better your ad is, the less you have to pay and still rank high. So, take advantage of all the little extras like extended links and callouts. Use all the characters you can but keep substance. Once you create a base ad, you can copy and edit to make versions to test. I added "Fully Secure Website" to one of my ads and it get 4 times the click through than any of my others in that ad group. I did this based on switching to all SSL all the time. Adwords also serves it higher, so it likes it. You can also tailor you bids based on areas like states (Texas for instance). Adjust based on days of the week or time of the day. Adjust up or down for phones with browsers. I bid that down because my biggest competitor on this isn't responsive in their site design. Remarketing was a huge fail for me that burned up cash with no ROI. Small bid adjustments that make you rank higher can cost way more than expected, so the 7 day running view is key. The other key is look at it every day. There is some trial and error, but this can get you sales you are otherwise missing. A lot probably depends on your margin, but for me I'll give 200 to sell 1600 especially since some will repeat. There's a lot more to this and I'm not sure how much this helps, but hopefully others have something to add.
-
If it can help you to understand google : look theses link A lot of good stuff https://www.thinkwithgoogle.com/
-
Mobile Friendly Good for checking if site is Mobile Friendly https://search.google.com/search-console/mobile-friendly?utm_source=mft&utm_medium=redirect&utm_campaign=mft-redirect Microdata Testing Tools Good for Schema. https://search.google.com/structured-data/testing-tool Facebook Link Good for Opengraph. https://developers.facebook.com/tools/debug/ Twitter Card Validator https://cards-dev.twitter.com/validator SSL https://www.ssllabs.com/ssltest/index.html"] https://www.ssllabs.com/ssltest/index.html Performs a deep analysis of the configuration of any SSL web server. Page Speed Tools https://gtmetrix.com GTmetrix is a free tool that analyzes your page's speed performance.
