DESCRIPTION OF INTEGRATION WITH ONLINE STORE OPENCART
The necessary tools to create a website:
- Online store OpenCart. Has been tested several versions of OpenCart (1.5.6, 1.5.4.1, 1.5.2.1).
Version 1.5.2.1 has been the most workable (1.5.4.1 does not work in search feature TAG)
- Import Tool for store OpenCart. For example "CSV IMPORT" (www.ka-station.com) (this is not
my developed, so that errors may occur in the work, although in testing errors was not revealed)
To develop the example I set a few goals :
- Import data of spare parts with images
- The opportunity to search for parts by original number and cross-reference number
- Integrate catalog search for spare parts according to the car. The catalog I do divide into
two options:
- Catalog based on categories (a standard feature of OpenCart)
- And most importantly, create a catalog, only based on the parts that are in stock (for
Processing to price list
Connecting price list for processing
Connect this file ("ONLYARTID.txt") as an additional filter for data export
EXPORT IMAGES
Export needed of images according list ART_ID and copying the exported images in any folder to the hosting
CREATING HTML-PAGES FOR SITE SELECTION OF SPARE PARTS (FOR INTEGRATION IN OPENCART)
Connecting as an additional filter of selection the needed of spare parts
CREATING HTML-PAGES FOR SITE SELECTION OF SPARE PARTS (FOR INTEGRATION IN OPENCART)
Specify needed brands of cars, all brands of spare parts and all trade groups. Add the path to the pictures (on disk) that have been previously exported
CREATING HTML-PAGES FOR SITE SELECTION OF SPARE PARTS (FOR INTEGRATION IN OPENCART)
Specify the path to page of search results OpenCart store
CREATING HTML-PAGES FOR SITE SELECTION OF SPARE PARTS (FOR INTEGRATION IN OPENCART)
Start the process of creating pages for the site selection of spare parts. On the way out we will have pages where will are only spare parts of my price list availability for these vehicles
example site
CREATING FILES TO IMPORT IN STORE OPENCART (without category, without quantity and price)
Specify needed brands of cars and all brands of spare parts, all trade groups. And specify out all the necessary data (path to image, eg) .
Run the export of data for store OPENCART. On the way out we will have a file that can be imported using the Import tool.
CREATING A FILE TO IMPORT IN SHOP OPENCART (with category, with quantity and price)
Specify needed brands of cars and all brands of spare parts, all trade groups. And specify out all the necessary data (path to image, eg) .
Run the export of data for store OPENCART. On the way out we will have a file that can be imported using the Import tool.
Speed up site OpenCart store
As you know, the shops on OpenCart differ slow work, which becomes apparent when will
increasing the amount of goods.
Basically OpenCart slow due to the large number of queries to MySQL. Often the cause of
slow performance can be:
- A large number of categories and sub-categories in OpenCart hinders its work;
- A huge amount of goods, usually a few thousand;
- The use of complex filters goods;
- Using VQmod;
- Also, the reason may be a slow hosting with low memory
Let's speed up the work of OpenCart making small changes,
optimizing the number of calls to the database mysql.
For version OpenCart 1.5.1.3, 1.5.2 и 1.5.2.1
find the file
catalog/controller/module/category.php
change it
$product_total = $this->model_catalog_product->getTotalProducts($data);
to
$product_total = 0;
change it
$category['name'] . ' (' . $product_total . ')',
to
$category['name'],
change it
$child['name'] . ' (' . $product_total . ')'
to
$child['name']
In addition to the version OpenCart 1.5.2.1
find the file
catalog/controller/common/header.php
change it
$product_total = $this->model_catalog_product->getTotalProducts($data);
to
$product_total = 0;
change it
'name' => $child['name'] . ' (' . $product_total . ')',
to
'name' => $child['name'],
in the file
catalog/controller/product/category.php
change it
$product_total = $this->model_catalog_product->getTotalProducts($data);
to
$product_total = 0;
change it
'name' => $result['name'] . ' (' . $product_total . ')',
to
'name' => $result['name'],
in the file
catalog/controller/module/category.php
change it
$product_total = $this->model_catalog_product->getTotalProducts($data);
to
$product_total = 0;
change it
$category['name'] . ' (' . $product_total . ')',
to
$category['name'],
change it
$child['name'] . ' (' . $product_total . ')'
to
$child['name']
For speed up the search for spare parts in store OpenCart
on the page/catalog/model/catalog/product.php that is responsible for searching the entered
number to make some changes :
change search field "tag" on the ability to search by copy "number search", in the original
version of OpenCart is search by pattern "number search"
REPLACE ROWS (IN TWO PLACES)
$implode[] = "LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%'
AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "'";
TO
$implode[] = "LCASE(pt.tag) ='" . trim(str_replace(array('_', '-', '-', '.', ',', ' ', '+', '/', '|'), '',
$this->db->escape(utf8_strtolower($word)))) . "' AND pt.language_id = '" . (int)$this->
config->get('config_language_id') . "'";