Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Patrick

  1. Nice work, clear, simple. Same remarks than the other to improve you design. Just question, do you change the Default template or do yu create another ? Do you use Paypal also ?
  2. Hello @Janett, it's simple fist call the HTML class and second create the link The result is : use ClicShopping\OM\HTML; replace this : $products_name by : HTML::link($products_name_url, $products_name) You have just to edit the others listing template and copy paste the code.
  3. No you are right, I have the same problem but it's little bug easy to fix inside the whois class. I think the next update will be be solved.
  4. You can try that : Backing up a single database mysqldump -u username -p database_name > data-dump.sql Restoring or loading the database mysql -u username -p new_database < data-dump.sql
  5. The best is to make with your console, the problem is your OS has a time limit and a size limit to upload your database fixed in php.ini
  6. Hi Catalina, I think you find a small bug, but you can change the sql request by this. It must resolve your problem. bm_page_manager $Qpages = $CLICSHOPPING_Db->prepare('select count(*) as count from :table_pages_manager where status = 1 and page_box = 0 and page_type = 4 and (customers_group_id = :customers_group_id or customers_group_id = 99) '); $Qpages->bindInt(':customers_group_id', (int)$CLICSHOPPING_Customer->getCustomersGroupID() ); and bm_page_manager_customize $QpagesSecondary = $CLICSHOPPING_Db->prepare('select count(*) as count from :table_pages_manager where status = 1 and page_box = 1 and page_type = 4 and (customers_group_id = :customers_group_id or customers_group_id = 99) '); $QpagesSecondary->bindInt(':customers_group_id', (int)$CLICSHOPPING_Customer->getCustomersGroupID() );
  7. Nice. Do not hesitate to put a question. We will try to help you.
  8. Hi @Catalina, You must decide where you want to implement this module. - Header, footer, boxe ? - You can look after an exististing module and you can include the information that you want inside. - Generally you have this inside the module(structure) - module_header_google_translate (case of header) he_header_google_translate.php content (directory) header_google_translate.php (html content) and the languages synthaxe (do forget to reset your language in admin if you make a mistake because it's included in cache) On this example : For he_header_google_translate.php <?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\CLICSHOPPING; class module_header_google_translate { public $code; public $group; public $title; public $description; public $sort_order; public $enabled = false; public $pages; public function __construct() { $this->code = get_class($this); $this->group = basename(__DIR__); $this->title = CLICSHOPPING::getDef('module_header_google_translate_title'); $this->description = CLICSHOPPING::getDef('module_header_google_translate_description'); if ( defined('MODULE_HEADER_GOOGLE_TRANSLATE_STATUS') ) { $this->sort_order = MODULE_HEADER_GOOGLE_TRANSLATE_SORT_ORDER; $this->enabled = (MODULE_HEADER_GOOGLE_TRANSLATE_STATUS == 'True'); $this->pages = MODULE_BOXES_GOOGLE_TRANSLATE_DISPLAY_PAGES; } } public function execute() { $CLICSHOPPING_Template = Registry::get('Template'); $content_width = (int)MODULE_HEADER_GOOGLE_TRANSLATE_CONTENT_WIDTH; $data = '<!-- header_google_translate start -->' . "\n"; $data .= '<script type="text/javascript">'; $data .= 'function googleTranslateElementInit() {'; $data .= 'new google.translate.TranslateElement({pageLanguage: \'en\'}, \'google_translate_element\');'; $data .= '}'; $data .= '</script>' . "\n"; $data .='<script defer src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>' . "\n"; ob_start(); require_once($CLICSHOPPING_Template->getTemplateModules($this->group . '/content/header_google_translate')); $data .= ob_get_clean(); $data .='<!-- header_google_translate end -->' . "\n"; $CLICSHOPPING_Template->addBlock($data, $this->group); } public function isEnabled() { return $this->enabled; } public function check() { return defined('MODULE_HEADER_GOOGLE_TRANSLATE_STATUS'); } public function install() { $CLICSHOPPING_Db = Registry::get('Db'); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Do you want to enable this module ?', 'configuration_key' => 'MODULE_HEADER_GOOGLE_TRANSLATE_STATUS', 'configuration_value' => 'True', 'configuration_description' => 'Do you want to enable this module in your shop ?', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'clic_cfg_set_boolean_value(array(\'True\', \'False\'))', 'date_added' => 'now()' ] ); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Please indicate the width of the content', 'configuration_key' => 'MODULE_HEADER_GOOGLE_TRANSLATE_CONTENT_WIDTH', 'configuration_value' => '12', 'configuration_description' => 'Please specify a display width', 'configuration_group_id' => '6', 'sort_order' => '2', 'set_function' => 'clic_cfg_set_content_module_width_pull_down', 'date_added' => 'now()' ] ); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Sort order', 'configuration_key' => 'MODULE_HEADER_GOOGLE_TRANSLATE_SORT_ORDER', 'configuration_value' => '500', 'configuration_description' => 'Sort order of display. Lowest is displayed first. The sort order must be different on every module', 'configuration_group_id' => '6', 'sort_order' => '3', 'set_function' => '', 'date_added' => 'now()' ] ); $CLICSHOPPING_Db->save('configuration', [ 'configuration_title' => 'Please indicate where boxing should be displayed', 'configuration_key' => 'MODULE_HEADER_GOOGLE_TRANSLATE_DISPLAY_PAGES', 'configuration_value' => 'all', 'configuration_description' => 'Sélectionnez les pages où la boxe doit être présente', 'configuration_group_id' => '6', 'sort_order' => '7', 'set_function' => 'clic_cfg_set_select_pages_list', 'date_added' => 'now()' ] ); } 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_GOOGLE_TRANSLATE_STATUS', 'MODULE_HEADER_GOOGLE_TRANSLATE_CONTENT_WIDTH', 'MODULE_HEADER_GOOGLE_TRANSLATE_SORT_ORDER', 'MODULE_HEADER_GOOGLE_TRANSLATE_DISPLAY_PAGES' ); } } Now the content : header_google_translate.php <div class="col-md-<?php echo $content_width; ?>"> <div class="separator"></div> <div id="google_translate_element"></div> </div> At the end the language : languages/english/modules/modules_header/he_header_google_translate.php module_header_google_translate_title = Do you want to enable google translate language module ? module_header_google_translate_description = Display google translate language Same for the french language. Now it's possible to improve the module and fix the script inside the footer by this code $footer_tag = '<script defer>'; $footer_tag .= 'function googleTranslateElementInit() {'; $footer_tag .= 'new google.translate.TranslateElement({pageLanguage: \'en\'}, \'google_translate_element\');'; $footer_tag .= '}'; $footer_tag .= '</script>' . "\n"; $footer_tag .= '<script defer src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>'; $CLICSHOPPING_Template->addBlock($footer_tag, 'footer_scripts'); 10 mn to do that.
  9. Hello @Josephine, Do you have look on the marketplace, there is an apps allow you to do that ?
  10. Hello @Catalina. Yes, you must do that. just for a module you must take all. If you install a new modules (files), it's better to put in default and a new template. Why because, if you create a new template, all the files will work with no error.
  11. Hi @Carole, No you mst go in Tools / Editor / Language. Reset language or edit a language to make your modification. The cache settings is different that the language.
  12. Try something like this : <div class="lozad" data-background-image="image.png" data-srcset="image.png 1000w, image-2x.png 2000w"></div>
  13. @Carole, Install on your local server php 7.4 and test you application. If everything works fine, you can go in production.
  14. Hello Dartagnan, No I do not think, but you can develop your own module inside the AntiSpam Apps, You have just look how this modules is made and add what you want inside. After, I use this module for long time now, and it works perfectly. No need to add a recaptcha.
  15. Hi @CoucheTard, Inside the Configuration (do not remeber exactly), I think you have an option where you can specify this information (look shipping)
  16. The difference : Hooks can not be removed or put offline (except if you make something inside apps for example) Hooks can not have option than you can activate (except if you make something inside apps for example) Hooks can display or make action on your website --> bootstrap is inside a hooks, it better that to include inside a header tag. Header_tag Yyou can choose if you want to put in header or footer You can activate or deactivate You can install or not You can make some different option There is more flexibility than a hooks? --> google analytics is better to be included inside header tag Which use ? Depend what you want to do. If you want to include some options, header tags is better. In summary
  17. Just a little note, The parameters allow to resize images but also when your upload an image to make a new image. The problem is when the image is too big in upload (weight or size). I looked the sript image_resample, I do not see anything about this problem, no maximum. Maybe the php librairy ?
  18. @ClicShopping, I just check and activated the module on the dashboard. Thank you to have included this nice feature. It helps to maintain an application, very good idea !
  19. http://localhost/clicshopping/shop/index.php/Account/LogIn http://localhost/clicshopping/shop/index.php?Account&LogIn That's the normal process, if you change ? or & it come back to the index page. If you are with the rewriting enable, you must respect the basic url approach and the standard inside the web url process Nothing for me particular.
  20. I can not reproduce your problem. Everything works fine. What the link do you click to have this result because the are 2 links, on in the header and one in the footer. All works fine.
  21. Hello, The default theme is the same for all version, after the template made is to help you to make you own more easily or to create your own module. Do you activate the rewrite SEO in Configuration/Store ? Without SEO : http://mysite/shop/index.php?Account&LogIn With SEO : http://mysite/shop/index.php/Account&LogIn demo with seo : https://demo.clicshopping.org/demo/index.php/Search/AdvancedSearch ==> correct no ? https://demo.clicshopping.org/demo/index.php/Products/Description/canon-eos-5d/products_id-8 https://demo.clicshopping.org/demo/index.php/Products/Featured - index.php/Account/LogIn in demo below login form is 2 register forms while source code index.php/Account&LogIn is 1 form only. ==> 2 because there is one for customer in B2C and 1 with B2B, the approach is different, depending what you want exactly. You can remove one if you want. (if I understand your question) ==> If you do not litke this, you can create your own login form if you want. How to change breadcrumb Index » ClicShopping » Favorites to ClicShopping » Favorites : my shop in homepage so, Index in breadcrumb with "Index" is an abundance. Look the files in ClicShopping/Service/Shop/Breadcrumb and comment (choose your line) this $CLICSHOPPING_Breadcrumb->add .... For the catalog image I do not understand your question, You have not use rm command, if you do that you can erase all the website if you are in the root ? Note : ClicShopping evolve day to day with minor version if bugs are discover. The system allow you to upgrade without to change anything inside the code if you follow the best pratice. Do not change classe : use the Custom Directory, u se Hooks, create new template, new module think it is not enough for production now ==>I think you do not very well the solution, take time. I hope this explanation is not to complicate. Look the documentation : https://www.clicshopping.org/forum/forum/8-documentation/ Best pratice : https://www.clicshopping.org/forum/forum/18-best-pratices-tip-trips-and-training/ blog : https://www.clicshopping.org/forum/blogs/blog/3-clicshopping/
  22. A nice function apear inside php 7.4 : Preload : https://wiki.php.net/rfc/preload It can increased the speed of the website, not a little . But the problem, every time you change something inside a file, you must restart the server because everything is push in memory. https://andrewdavis.me/post/introduction-to-php-7-4-preload/ Note : when I wil install php 7.4, I will make some test also !
  23. If I understand your question, you will find this in Configuration/Shipping
  • Create New...

Important Information

By using this site, you agree to our Terms of Use