Coder Social home page Coder Social logo

lscache-opencart's People

Contributors

litespeedtech avatar lslisa avatar wuhuachen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lscache-opencart's Issues

Journal Product QuickView popup not cached by standard algorithm

Journal have Product QuickView popup feature.

after full site recache by crawler, QuickView popup become "very slow view", because product link open more faster than quickview popoup.

in /catalog/controller/extension/module/lscache.php
to cache Product QuickView popup need to add:

if (defined('JOURNAL3_ACTIVE')) {
$urls[] = $this->url->link('journal3/product', 'product_id=' . $result['product_id'] . '&popup=quickview');
}

Multi-Store Issue / Feature Suggestion

Hi,

I've just upgraded to the latest version from a very old one and the improvements are fantastic. However, I have an issue. I use OpenCart because it has multi-store options.

I ran the recache function and it awesome that you can see what pages are being cached. But, once it scanned and cached the default store it stopped. Only the default store was re-cached.

Was it an oversight not to include code to check for additional stores?

Should it have re-cached my other stores but failed?

My suggestion is simple.

FEATURE SUGGESTION: Allow the user to select which store they want to recache and which store to purge.

My main store has a huge catalogue, my the other store are small and more focused on one niche. To recache all stores because you have made a change on one of them is a long, slow and needless process. Likewise, why purge everything?

Feedback back on my suggestion would be most welcome.

Is the only workaround to use the cURL function? Some help would be great.

Thanks,
Midge

Exceed php memory limit by crawler on huge number of products

in Opencart by default are THREE path to product page:

  1. only product_id path: /index.php?route=product/product**&product_id**=41
  2. by category_id (categoy path) /index.php?route=product/product**&path=20_27**&product_id=41
  3. by manufacturer_id : /index.php?route=product/product**&manufacturer_id**=8&product_id=41

crawler algorithm contain 1 and 2, path 3 (by manufacturer_id) forgotten!

on huge number of products, for example, more than 6000, array urls() exceed php memory limit and crawler stop!

that's why I replace in

catalog/controller/extension/module/lscache.php

echo 'recache product urls...' . ($cli ? '' : '<br>') . PHP_EOL;
        foreach ($this->model_catalog_product->getProducts() as $result) {
            foreach ($this->model_catalog_product->getCategories($result['product_id']) as $category) {
                if (isset($categoryPath[$category['category_id']])) {
                    $urls[] = $this->url->link('product/product', 'path=' . $categoryPath[$category['category_id']] . '&product_id=' . $result['product_id']);
                }
            }
            $urls[] = $this->url->link('product/product', 'product_id=' . $result['product_id']);
        }

        $this->crawlUrls($urls, $cli);

by this:

 echo 'recache product urls...' . ($cli ? '' : '<br>') . PHP_EOL;
        $UrlsCount = 0;
        $UrlsCountCount = 0;
        $this->load->model('catalog/manufacturer');
        foreach ($this->model_catalog_product->getProducts() as $result) {
            foreach ($this->model_catalog_product->getCategories($result['product_id']) as $category) {
                if(isset( $categoryPath[$category['category_id']] )){
                    $urls[] = $this->url->link('product/product', 'path=' . $categoryPath[$category['category_id']] . '&product_id=' . $result['product_id']);
                    $UrlsCount++;
                }
            }
            $urls[] = $this->url->link('product/product', 'manufacturer_id=' . $result['manufacturer_id'] . '&product_id=' . $result['product_id']);
            $UrlsCount++;

            $urls[] = $this->url->link('product/product', 'product_id=' . $result['product_id']);
            $UrlsCount++;

            if ( $UrlsCount > 4096 ) {
                $UrlsCountCount++;
                echo 'recache '. $UrlsCountCount . ' part of product urls...' . ($cli ? '' : '<br>') . PHP_EOL;
                $this->crawlUrls($urls, $cli);
                $urls = array();
                $UrlsCount = 0;
            }
        }
        echo 'recache '. $UrlsCountCount . ' part of product urls...' . ($cli ? '' : '<br>') . PHP_EOL;
        $this->crawlUrls($urls, $cli);

Notice: Undefined index: language /extension/module/lscache.php on line 334

OpenCart 3.0.3.2

Fresh installation, default store.
Installed "lscache-opencart3.0-V1.3.0.ocmod.zip" with default settings.

Along the top of the frontend I see this error.

Notice: Undefined index: language in /data/redacted/domains/redacted.com/public_html/opencart/catalog/controller/extension/module/lscache.php on line 334

and

Notice: Undefined index: language in /data/redacted/domains/redacted.com/public_html/opencart/catalog/controller/extension/module/lscache.php on line 335

/admin/model/extension/module/lscache.php information/contact include or exclude?!?!

at file 3.0/upload/admin/model/extension/module/lscache.php

line 239:
$this->db->query(" insert into " . DB_PREFIX . "setting (store_id, code, key, value, serialized) values ('0', 'module_lscache', 'page_information_contact', '{"name":"Contact Us","route":"information\/contact","cacheLogout":"1","cacheLogin":"1", "default":"1"}', '1')" ) ;

information/contact include to LSCache

but at line 277:
$excludeRoutes = array(
......
'information/contact',
......

information/contact excluded from routes that cached.

some mistypes in language file

3.0/upload/admin/language/en-gb/extension/module/lscache.php

$_['entry_vary_login'] = 'Sep_e_rate View for Logged-in Users';

must be

$_['entry_vary_login'] = 'Separate View for Logged-in Users';

$_['help_purge_category'] = 'Purge Product Category cache after saving an Product';

may be must

$_['help_purge_category'] = 'Purge Product Category cache after saving a Product';

or better

$_['help_purge_category'] = 'Purge Product Category cache after saving Product';
?????

Warning: Opencart 3.0.3.2

When I try to include on Opencart 3.0.3.2 / Ocstore 3 Error
Image of Yaktocat
Tried on clean install Opencart 3.0.3.2 / OcStore 3.0.2.0. LsWs 3.4 Stable
lscache-opencart3.0-V1.2.0

Issue - Add to cart success alert message is cached and displayed in account page, and few other irrelevant pages

Hello LiteSpeed Team,

Your plugin improves the OpenCart website performance to a great extent. Just a few issues alone

Issue with Basel theme - Add to cart success alert message is cached and displayed on the account page and a few other irrelevant pages. Please refer to this attachment

LiteSpeed_Cache_Issue

OpenCart Version - 3.0.3.8 (https://github.com/opencart/opencart/tree/3.0.x.x_Maintenance)
PHP Version - 8.1
LiteSpeed Plugin Used - https://github.com/litespeedtech/lscache-opencart/tree/master/3.0/upload

Kindly can you fix this Issue

Also, can you kindly add support for this theme (https://themeforest.net/item/basel-ajax-driven-opencart-theme/20199321) similar to the Journal theme

Thanks

ESI serious problem!

I use Litespeed Web Server. (not openlitespeed!)
Cyberpanel + Litespeed latest versions.
Php 7.1

There is no problem when I activate LSCache over Opencart 3.0.3.2 version. But; The site is broken when I activate the ESI feature.

At first I thought this was due to the special theme I used. But I installed zero with the default theme, I just installed LSCache without installing any plugin and the result is frustrated.

The problem is that some of the HTML code on the site is DELETED when ESI is activated. The <title> tag is one of them.

I wrote this strange issue from Litespeed Support, no return for 3 days. Isn't it pointless to use a system like Opencart without ESI?

Error installing on 3.0.3.2 with Journal theme

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Template::__construct(), 1 passed in /home/centvit/public_html/admin/controller/extension/module/lscache.php on line 301 and exactly 2 expected in /system/library/template.php:24

This is the error i get after installing the module with ocmod, and then go to Modules > LiteSpeed Cache and hit the + button.

curl option for fast recache and small lscache size

in long and hard discussion with serpent_driver and researching parameters of his "superfast recaching method" finding really "magic" option for curl in crawler algorithm.

curl_setopt($ch, CURLOPT_ENCODING, "");

must be added in

/catalog/controller/extension/module)/lscache.php

after this:

curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

after adding this options:

  • speed of recache increase up to 3 times

  • size of already generated cache decrease up to 10 times

file of cache after lscache header now contain not full html code of cached page like:

<title>Пряжа высокого качества Турции, Италии в широчайшем ассортименте - интернет-магазин "Пряжа-shop"</title>

..............
Copyright © 2019-2022, Priazha-shop, All Rights Reserved


OK
Этот сайт использует файлы cookies.
<script src="https://static.priazha-shop.com/catalog/view/theme/journal3/assets/0d6cd2a9a1e51254b9f0317c0826cc05.js?v=14218c54"></script>

now:
lscache_encoding

but lscache work!!!

Very Serious problem --Bug report

After fully uninstall the cache extension in the backend of opencart 3.0.3.2, I can't open the admin panel of opencart anymore. (can't view the page example.com/admin)
I am using newest openlitespeed with cyberpanel and opencart V3.0.3.2.
Please tell me the correct method to fully uninstall the cache extension for opencart .
Now, I can't login to the backend .
Please try to fix it.
Bug-of-uninstall-the-extension-inOC3 0 3 2

Cannot declare class Mobile_Detect

Error on 2.3.0.2 after installing version 1.2.1.

Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in /system/library/Mobile_Detect/Mobile_Detect.php on line 23

OpenCart4x

Hello, can you please make it compatible for opencart 4.0.1.1, module not working in opencart4x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.