Jump to content

Foster

Members
  • Posts

    86
  • Joined

  • Last visited

    Never
  • Days Won

    19

Posts posted by Foster

  1. A little example allow you to configure your htaccess to increase the speed and security

     

    Options -Indexes
    Options +FollowSymlinks
    
    #### Your config to change ###############
    #AllowOverride All
     AcceptPathInfo on
    
    
    ##################################
    # Security
    ##################################
    
    
    
    <IfModule mod_headers.c>
    # prevent mime based attacks
    Header set X-Content-Type-Options "nosniff"
    
    # XSS Protection
    Header set X-XSS-Protection "1; mode=block"
    
    #content policy
    #Header set Content-Security-Policy "script-src 'self' https://www.mydomain.org"
    
    #X Frame
    Header always set X-FRAME-OPTIONS "DENY"
    </IfModule>
    
    
    #Header always append X-Frame-Options SAMEORIGIN
    #CORS
    # Always set these headers.
    #Header always set Access-Control-Allow-Origin "*"
    #Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
    #Header always set Access-Control-Max-Age "1000"
    #Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
    
    #### Your config to change URL rewriting ###############
    #Uncomment and adapt
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    ## URL Canonicalization
    #to change in function your website
        RewriteBase /shop/
    
        RewriteCond %{HTTP_HOST} !^mydomain.org$ [NC]
        RewriteRule ^(.*)$ https://www.mydomain.org/$1 [L,R=301]
    
    #to change in function your website
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
    
    #to change in function your website
        RewriteRule . /shop/index.php [L]
    
    
    #Caching schema
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    #Caching schema
    
    ## EXPIRES CACHING ##
    ## https://gtmetrix.com/leverage-browser-caching.html ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
    ExpiresByType application/font-woff "access plus 1 year"
    ExpiresByType application/x-font-woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType font/opentype "access plus 1 year"
    ExpiresByType font/ttf "access plus 1 year"
    ExpiresByType font/otf "access plus 1 year"
    ExpiresByType application/x-font-ttf "access plus 1 year"
    ExpiresByType application/x-font-otf "access plus 1 year"
    </IfModule>
    
    #apache 2.4
      <IfModule mod_version.c>
          <IfModule mod_filter.c>
            <IfVersion >= 2.4>
                FilterDeclare COMPRESS
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/css'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/plain'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/x-component'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/javascript'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/json'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xhtml+xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/rss+xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/atom+xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/vnd.ms-fontobject'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/svg+xml'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/x-icon'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/x-font-ttf'"
                FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'font/opentype'"
                FilterChain COMPRESS
                FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
            </IfVersion>
          </IfModule>
      </IfModule>

     

     

    • Like 4
    • Thanks 1
  2. @Janett

     

    You will find more information here : https://getcomposer.org/doc/00-intro.md

     

    Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

    The main advantage, it's install you all the dependencies and allow you to call easily the classes inside our script.

    Looking the composer external directory :

    guzzlehttp ==> api connect

    phpmailer ==> send email

    xml-rpc ==> webservice

    fpdf  ==> invoice

    are installed by default.

    thank you for this release @ClicShopping

    • Like 3
    • Thanks 2
  3. Downloaded and installed via the administration, No configuration to make except to select the template.

    Seems to work fine.

    I look a little, it'a a new directory with some files. there  is some override behind that !

    In all case, if there is an update about ClicShopping like the latest pre-release, the work on the design is not touch. In my sens it's a very good point.

  4. First you must know ClicShopping is made like this

    1 module = 1 css

    In this case all the products listing has their own css, you must modify the css and update the files in consequences;

    I recommend you to create a new module (it's easy, it's just a replace) with this own css.

  5. The code below create a circle. it use the bootstrap function

    This is a  pure html but after you must translate in function the ClicShopping Code.

     

           .btn-circle.btn-xl { 
                width: 70px; 
                height: 70px; 
                padding: 10px 16px; 
                border-radius: 35px; 
                font-size: 12px; 
                text-align: center; 
            } 

     

    and

     

    <button type="button" class="btn btn-danger btn-circle btn-xl">30 %</button>

     

  6. You must be carefull at this :

     

    Excessive volume of emails (exceeding host's per-minute, per-hour, per-day caps). You need to find out from your host what the limits are (important for newsletter).
    Newsletters and other "not necessary" communications (mass mailings) have to be explicitly "opt in", to avoid legal problems and accusations of spamming.

    Respect the regulation and if the customer has opt in the newsletter.

    If your host (or other systems, such as Yahoo or Gmail) are flagging the content of any of your emails as spam, you will need to adjust the wording and contents to pass the spam tests.

    • Like 1
  7. I am looked more information about that and find a technical information

    It can help you why you have a problem :

     

    Quote

    When you use PHP's mail() function (what PHPMailer uses by default), it opens a shell and calls a sendmail binary (a client program for submitting email messages from a command line) belonging to your local mail server. If you don't have a local mail server, it can't work, and you get the error you're seeing. You could get the same error if there is a mail server, but you don't have permission to run sendmail.  You need to do one of:  Install a mail server (such as postfix) Talk to a local server via SMTP (which will not be subject to permissions issues in the same way that mail() is) Use SMTP to send through a remote mail server, either your ISP's or some other server such as gmail (if your ISP allows outbound SMTP).

     

  8. @JKaz

    No, it simple if you follow the instruction above.

    I recommend you to have a tool like beyond compare or similar. In this case, you can compare the files and update what you want.
    if you have all the files inside a new directory, just copy the file, that's all else you must compare.

    Thank you for your work :) @ClicShopping

     

  9. Yes you can do that,

    Look this line

    $product_tab_description .= '<div class="tab-pane" id="tab' . $n . '">' . $r . '</div>';

    you have just add the same after the loop and update. After you can make a new one with all that you want inside.

     

    • Like 1
  10. Yes, it's possible to let the administrator choose But in other parts it's maybe better for him to have no choice. Some government looks the website to identify if it respects the law or not.

    There is another option, make a rule to let the customer contact the shop owner for that. But it's must be clear inside the website rules.

     

     

  11. There an example :

    You can see a status there :

    http://localhost/shop/ClicShoppingAdmin/index.php?A&Configuration\Modules&Configure

     

    look the Module directory :Apps/Configuration/Modules/Module/ClicShoppingAdmin/Config/MO/Params

     

    2/ Inside you can see a status files, copy and paste inside the same directory.

    Change the filename status_stats_products.php for example

    You can have something like this :

    <?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/
     *
     */
    
    
      namespace ClicShopping\Apps\Configuration\Modules\Module\ClicShoppingAdmin\Config\MO\Params;
    
      use ClicShopping\OM\HTML;
    
      class status_stats_products extends \ClicShopping\Apps\Configuration\Modules\Module\ClicShoppingAdmin\Config\ConfigParamAbstract {
        public $default = 'True';
        public $sort_order = 10;
    
        protected function init() {
            $this->title = $this->app->getDef('cfg_products_modules_status_stats_products_title');
            $this->description = $this->app->getDef('cfg_products_modules_status_stats_products_description');
        }
    
        public function getInputField()  {
          $value = $this->getInputValue();
    
          $input =  HTML::radioField($this->key, 'True', $value, 'id="' . $this->key . '1" autocomplete="off"') . $this->app->getDef('cfg_products_modules_status_true') . ' ';
          $input .=  HTML::radioField($this->key, 'False', $value, 'id="' . $this->key . '2" autocomplete="off"') . $this->app->getDef('cfg_products_modules_status_false');
    
          return $input;
        }
      }

     

    2/ Now don't forget to reate the files inside  your language  directory

     

    3/ Now actualize your page, a new configuration is added inside the configuration database : CLICSHOPPING_APP_MODULES_MO_STATUS_STATS_PRODUCTS

     

    4/ now go in this directory :  Includes/Module/Hooks/ClicShoppingAdmin/Dashboard

    Edit your hooks stats_products .php for example and add after :  function  execute()

    this :

     

    if (!defined('CLICSHOPPING_APP_MODULES_MO_STATUS_STATS_PRODUCTS') || CLICSHOPPING_APP_MODULES_MO_STATUS_STATS_PRODUCTS == 'False') { 
      return false; 
    }

     

    Now you can control your hook and display the information or not.

     

     

     

     

    • Like 2
    • Thanks 2
×
×
  • Create New...

Important Information

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