Leaderboard
Popular Content
Showing content with the highest reputation on 12/16/22 in all areas
-
Email is part of communication, below different examples how to set email inside ClicShopping Example 1 : o2switch.net User name : myemail@domain.com - Password : email password - Server : mail.test.domain.com - remove mail. and write only test.domain.com - SMTP Port: 26 - SMTP authentication : true - SMTP secured protocol : ssl - Emails activation : true Example 2 : gmail.com - User name : myemail@gmail.com - Password : Utilisez le mot de passe du compte de messagerie. - Server smtp : smtp.gmail.com - remove smtp. and write only gmail.com - SMTP Port: 25 ou 465 - SMTP authentication : true - SMTP secured protocol : ssl or Tls - Emails activation : true2 points
-
When Google or other search engines come to your site to read and store the content in its search index, it will look for a special file called robots.txt. This file is a set of instructions to tell search engines where they can look to crawl content and where they are not allowed to crawl content. We can use these rules to ensure that search engines don't waste their time looking at links that do not have valuable content and avoid links that produce faceted content. Why is this important? Search engines need to look at and store as many pages that exist on the internet as possible. There are currently an estimated more 4.5 billion web pages active today. That's a lot of work for Google. It cannot look and store every single page, so it needs to decide what to keep and how long it will spend on your site indexing pages. This is called a crawl budget. How many pages a day Google will index depends on many factors, including how fresh the site is, how much content you have and how popular your site is. Some websites will have Google index as few as 30 links a day. We want every link to count and not waste Google's time. What does the suggested Robots.txt file do? ClicShopping optimised rules exclude site areas with no unique content but instead redirect links to existing topics. Also excluded are areas such as the privacy policy, cookie policy, log in and register pages and so on. Submit buttons and filters are also excluded to prevent faceted pages. Finally, user profiles are excluded as these offer little valuable content for Google but contain around 150 redirect links. Given that Google has more seconds on your site, these links that exist elsewhere eat up your crawl budget quickly. What is the suggested Robots.txt file? Here is the content of the suggested Robots.txt file. If your ClicSHoppingis inside a directory, you will need to apply it to the root of your site manually. So, for example, if your community was at /home/site/public_html/myDirectory/ - you would need to create this robots.txt file and add it to /home/site/public_html. It's simple just edit robot.txt and change inside the information example of robot.txt Note : domain.ltd must be changed by your domain. # Rules for ClicSopping (https://www.clicshopping.org) User-Agent: * # Block pages with no unique content Disallow: /Account/LogIn/ Disallow: /Account/CreatePro Disallow: /Account/Create Disallow: /Account/PasswordForgotten Disallow: /Search/AdvancedSearch/ Disallow: /Search/Q/ # Block faceted pages and 301 redirect pages Disallow: /*?page= Disallow: /*?sort= # Sitemap URL Sitemap: https://domain.tld/index.php?Sitemap&GoogleSitemapIndex2 points
-
The version 3.323 allows to use htaccess to rewrite the url. To use this function you must activate in Shop/SEO urls this 2 options 1 - Use Search-Engine Safe Native URLs this option rewrites the url like this : https://demo.clicshopping.org/index.php/Products/Description/logitech-trackman-marble-mouse/Id-12 and 2- Use Search-Engine Safe URLs Pro (with htaccess) This option rewrites the url like this : https://demo.clicshopping.org/Products/Description/logitech-trackman-marble-mouse/Id-12 To use the last option, you must include inside your root an htaccess with this syntax. Of course, it can updated in function of your server. note : This option works only on the catalog without customer, if your are logged you will see the url above. It's optimized only for the search engine. For apache 2.4 ################################## # url rewiting #improve url rewriting #work fine without directory https://mydomain.com/test/index.php #the rewriting must be activated inside the application # uncomment ################################## <IfModule mod_rewrite.c> RewriteEngine On DirectorySlash Off # # Remove WWW # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=302,L] # # Remove Trailing Slashes # RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{THE_REQUEST} \s(.+?)//+[?\s] RewriteRule ^ %1 [R=302,L] # # Reroute to index.php # RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>2 points
-
With PHP 7.4, support for preloading was added, a feature that could improve the performance of your code significantly. In a nutshell, this is how it works: - In order to preload files, you need to write a custom PHP script - This script is executed once on server startup - All preloaded files are available in memory for all requests - Changes made to preloaded files won't have any effect, until the server is restarted If you want more information, some article are available on this new feature. library used (under MIT licence): https://github.com/DarkGhostHunter/Preloader 1 / Mandatory Requirement - Php 7.4 minimum version - opCache installed - An access to your php.ini - Work in 777 chmod 2 / How to implement : Step 1 : Know your path You must know your root on preloader.php inside your application. below an example www/var/..../shop/includes/ClicShopping/Work/Log/preloader.php Step 2 : Php.init implementation Edit your php.init and search this line : ;opcache.preload= replace by your root path : below an example opcache.preload=/home/www/..../shop/includes/ClicShopping/Work/Log/preloader.php Step4 : Restart apache2 Make this command inside your terminal sudo service apache2 restart Step5 : Configure ClicShopping * Go to ClicShopping Administration - Menu Configuration / Session & Cache / Compression & optimization - Activate the preload functionnalities * Go to your catalog and actualise a page - The sytem will create a preloader.php file inside your Work/Log directory - You can check if everything is correct in editing your preload.php files. You must see some information inside.1 point
-
This tuto allow to make an app quickly without knowledge. Inside you will have important element to use and change to create a new app. you must after updated inside your need. - First download a App name New_Template on Github and follow these instructions (https://github.com/ClicShoppingOfficialModulesV3/apps_catalog_new_template) - Copy the app New_Template inside your includes/Apps/Catalog directory - Rename the directory New_Template by MY_NEWS_APP (name of your new application) - Replace all these terms in my MY_NEWS_APP directory : Please respect the syntax lower and uppercase. it's very important. - NewTemplateAdmin by MyNewAPPAdmin - new_template by my_new_app - New_Template by My_New_APP - NEW_TEMPLATE by MY_NEWS_APP - NT BY MA ==> becarefull when you make that. - _nt_ by _ma_ Rename directories and files - New_Template.php by My_New_App.php - new_template.php by my_new_app.php - NT.php by MA.php - NT by MA - Inside this directory Sites\ClicShoppingAdmin\Pages\Home\Actions\Configure - edit Install.php - Update in consequence. - Update the language files Note These directories has been inserted to help you. If you don't need, you can remove. - Remove Classes directories if you don't have need. - Remove Hooks language and Products directory if you don't have need. Don"t forget to update your clicshopping.json If you need specific classes, create a specific directories ClicShoppingAdmin for the admin and Shop for the catalog. now you are ready, you can find some apps to help you to continue your development on Github : https://github.com/ClicShoppingOfficialModulesV3 Now you ready to install you new app. https://www.mydomain.net/shop/ClicShoppingAdmin/index.php?A&MY_NEWS_APP1 point
-
This tuto help you how to create a module to be downloaded from github communiy or official add on. In the future, it will be integrated (maybe) inside the application to allow the community to push their module on GitHub ClicShopping community. In this tuto, we create a new module called: module_header_tags_favicon Note,: In different apps, you can also create a header tag module: For example like products app to include an header tag facebook. If you module header tag is used in all the website, it's better to follow this example. Very important: All the modules start must begin by : module_ module_apps_best_selling, module_header_tags_touch_icon, modules_header_bootstrap_caroussel The structure of the directory module_header_tags_favicon ===> note : the directory must have the same name of your module readme.md LICENCSE -- includes ----modules ----header_tags -- ModulesInfosJson -- sources ---- images ------ icons ---- languages ------ english -------- modules ----------header_tags ------ french -------- modules ----------header_tags Step 1 Insides this directory : header_tags create a file called ht_favicon.php -- includes ----modules ----header_tags ----- ht_favicon.php insert this code <?php /** * * @copyright 2008 - https://www.clicshopping.org * @Brand : ClicShopping(Tm) at Inpi all right Reserved * @Licence GPL 2 & MIT * @licence MIT - Portion of osCommerce 2.4 * @Info : https://www.clicshopping.org/forum/trademark/ * */ use ClicShopping\OM\Registry; use ClicShopping\OM\HTTP; use ClicShopping\OM\CLICSHOPPING; class ht_favicon { public $code; public $group; public $title; public $description; public $sort_order; public $enabled = false; public function __construct() { $this->code = get_class($this); $this->group = basename(__DIR__); $this->title = CLICSHOPPING::getDef('module_header_tags_favicon_title'); $this->description = CLICSHOPPING::getDef('module_header_tags_favicon_description'); if ( defined('MODULE_HEADER_TAGS_FAVICON_STATUS') ) { $this->sort_order = MODULE_HEADER_TAGS_FAVICON_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_FAVICON_STATUS == 'True'); } } public function execute() { $OSCOM_Template = Registry::get('Template'); $extansion_favicon = MODULE_HEADER_TAGS_FAVICON_EXTENSION_FAVICON; $OSCOM_Template->addBlock('<link rel="icon" type="image/' . $extansion_favicon . '" href="' . HTTP::getShopUrlDomain() . 'sources/images/icons/favicon.' . $extansion_favicon . '">', $this->group); } public function isEnabled() { return $this->enabled; } public function check() { return defined('MODULE_HEADER_TAGS_FAVICON_STATUS'); } public function install() { $CLICSHOPPING_Db = Registry::get('Db'); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Do you want install this module ?', 'configuration_key' => 'MODULE_HEADER_TAGS_FAVICON_STATUS', 'configuration_value' => 'True', 'configuration_description' => 'Do you want activate this module ?', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))', 'date_added' => 'now()' ] ); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Choose favicon extansion ?', 'configuration_key' => 'MODULE_HEADER_TAGS_FAVICON_EXTENSION_FAVICON', 'configuration_value' => 'png', 'configuration_description' => 'Extansion allowed : png, gif ou ico : <br /><br /><strong>Note :</strong><br /><br />- The favicon must be in the sources/image/icons directory', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'osc_cfg_set_boolean_value(array(\'png\', \'gif\', \'ico\'))', 'date_added' => 'now()' ] ); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Display sort order', 'configuration_key' => 'MODULE_HEADER_TAGS_FAVICON_SORT_ORDER', 'configuration_value' => '75', 'configuration_description' => 'Display sort order (lower is displayed in first)', 'configuration_group_id' => '6', 'sort_order' => '55', 'set_function' => '', 'date_added' => 'now()' ] ); return $CLICSHOPPING_Db->save('configuration', ['configuration_value' => '1'], ['configuration_key' => 'WEBSITE_MODULE_INSTALLED'] ); } public function remove() { return Registry::get('Db')->exec('delete from :table_configuration where configuration_key in ("' . implode('", "', $this->keys()) . '")'); } public function keys() { return array('MODULE_HEADER_TAGS_FAVICON_STATUS', 'MODULE_HEADER_TAGS_FAVICON_EXTENSION_FAVICON', 'MODULE_HEADER_TAGS_FAVICON_SORT_ORDER'); } } Step 2 : In ModuleInfosJson directory, create module_header_tags_favicon.json ModuleInfosJson -- module_header_tags_favicon.json Note : module_header_tags_favicon.json has the same namo of you root directory the json must have these elements { "title": "module_header_tags_favicon", "type": "meta tag", "vendor": "ClicShopping", "is_free": "yes", "is_free": "no", "website_link_to_sell" : "", "version": 1.0, "req_core_version": 3.0, "license": "GPL 2", "tag": "header tag, script, meta tag, favicon", "install": "includes/modules/", "module_directory": "header_tags", "apps_name": "", "type_module": "fixe", "dependance": "", "description": "This module allow you to insert a favicon inside your site", "image": "", "authors": [ { "name": "ClicShopping Team", "company": "", "email": "", "website": "", "Community": "http://www.clicshopping.org" } ] } Note on the most important json elements : - title must have the same name of your directory - type : apps or modules_directory (ex : modules_footer) - is_free : Yes or No (if no include your link in website_link_to_sell) - is_core : Yes or No - type module : fixe or template - dependance : if you must have another module to use this module. For example a hook - module_directory: Module directory - apps_name : Apps Directory name Step 3 : Image In icons directory -- sources ---- images ------ icons In icons directory insert : favico.gif, favicon.ico, favicon.png Step 4 Languages ---- languages ------ english -------- modules ----------header_tags ------ french -------- modules ----------header_tags In each header_tags directory insert this file : ht_favicon.txt and include inside for english : module_header_tags_favicon_title = Do you want use Favicon balise module_header_tags_favicon_description = Add favicon balise in the store for french : module_header_tags_favicon_title = Souhaitez utiliser la balise Favicon pour afficher une petite image à cotè de l'URL ? module_header_tags_favicon_description = Ajouter une petite image en 64x64 à coté de l'URL1 point
-
ClicShopping 3.X allow you to use use hooks inside your App to increase the functionalities in others App. To use this element you can have different choice depends with the app than you want to use Use the Hooks In hooks you have 2 choices : output to display an information call to use a function. $CLICSHOPPING_Hooks->call('Orders','Update'); $CLICSHOPPING_Hooks->ouput('Orders','ContentTracking', null 'display); To use the hook with call you can have different choices depending of the Hooks : The best is to look this directory inside the original hook where you want to include anew functionalities : ClicShopping/Apps/Products/ExtraFields/Modules/Hooks/ClicShoppingAdmin/ExtraFields $CLICSHOPPING_Hooks->call('Products','Insert'); $CLICSHOPPING_Hooks->call('Products','Update'); $CLICSHOPPING_Hooks->call('Products','Delete'); $CLICSHOPPING_Hooks->call('Products','Save'); At end, don't forget to insert in the clicshopping.json the new hook Display a Hooks About to display a hooks inside the page you can you something like that <div id="ContentTabQuantityDiscount"> in the original files you want to modify inside the hooks you can use this element to display the information. it could a new tab or inside a tab a content. For a Tab $dejardins_button = HTML::button('button_name'); $content = '<div> Desjardi</div>; $output = <<<EOD <div class="tab-pane" id="section_CMCICApp_content"> <div class="mainTitle"></div> <div class="adminformTitle"> <div class="separator"></div> {$dejardins_button} {$content} </div> </div> <script> $('#section_CMCICApp_content').appendTo('#orderTabs .tab-content'); $('#orderTabs .nav-tabs').append(' <li class="nav-item"><a data-target="#section_CMCICApp_content" role="tab" data-toggle="tab" class="nav-link">{$tab_title}</a></li>'); </script> EOD; For a content you can use append or prepend $content = '<div>mycontent</div>'; $output = <<<EOD <!-- ######################## --> <!-- Start SpecialsApp --> <!-- ######################## --> <script> $('#tab9Content').prepend( '{$content}' ); </script> <!-- ######################## --> <!-- End SpecialsApp --> <!-- ######################## --> EOD; For more informations, see the Hooks documentation1 point