Hey people,
Thanks in advance to those who can help me.
Can you tell me how to duplicate (absolutely everything) a store or at least the products and then import them automatically in another store?
Hope I will get the help. Thank you.
TO MAKE SURE, everything will function, at start, preferably, DISABLE all active VqMod's and OcMod EXTENSIONS, before copy/paste the Shop Software into a NEW Sub. ALSO, change in the ADMIN Settings to the OC english DEFAULT THEME + LANGUAGE.
In your Server Admin Console, you may have a FILE-MANAGER Option to COPY / PASTE your entire SHOP Directory, with ALL IT'S CONTENT, exept for ANY (not needed) CACHE CONTENT (vqmod/vqcache/...) (v.1.x system/cache/...) (v.2.x system/storage/cache/...) (image/cache/...), into another Subdirectory. If you don't have this Function available, you need to download the entire SHOP Folder by use of an FTP-Client, and re-upload it to another Subdirectory.
EXEPT FOR BOTH config.php Files, and the .htaccess file, wich have to be rewritten, in Part, as explained further down below, and uploaded, after beeing modified, to the new Store Sub. You have to download those 3 Files in any Case, to rewrite them, to match the new Shop Subdirectories as well as it's new HTTP URL + DB-Name.
Then, in your Server MySQL-Admin Section, you FIRST need to create a NEW, virgin DB. Because I was not able, on my Server, to automatically CREATE a new DB, by use of the 'COPY/PASTE DB into a NEW DB' Function, actually offering/including this (selectable) Option, therefore, I just created a new One, the REGULAR WAY. Try it, it may work, on your Server, it depends on the Hoster, wich way you will be able to create it easier, just DO NOT IGNORE to set the correct DB Prefix (oc_ - or whatever you use/have...), it's upmost important, to make the DB work !...
So, COPY/PASTE your existing SHOP DB into this new DB, by use of the above mentioned function in the MySQL-Admin, as shown on the image, shown on the Post, linked below.
http://forum.opencart.com/viewtopic.php ... 78#p581784
Then, you REWRITE your existing BOTH config.php Files, to be copied/uploaded to your NEW SHOP SUB, to match the NEW SITE URL as well as the SERVER PATHS, to match the new Subdirectory, AS WELL, as the new DB NAME, eventually access credentials as well, if you defined a new DB-User Name or DB-Password as well, for this new DB...
Sample NewShop Site config.php:
THEN, CHECK/REWRITE your .htaccess file, if you already used one, in your old shop:
# SEO URL Settings, update RewriteBase / (possibly linked as: RewriteBase /shop/ in your first shop)
# if Store URL: yournewshop.com/newshop/, then Update to: RewriteBase /newshop/
to make sure, it functions correctly.
THEN, make sure, VQMOD will function, if it had been installed already in your OLD SHOP, by using
to get the Message back, that it already had been installed, or, that is now is installed, whatever....
THEN, if you have everything done correctly, your new shop will be functional! I do it on a regular scale,
this way, to test new things, without disturbing existing Test-Installations!
Good Luck
Ernie
bigmax.ch/shop/
In your Server Admin Console, you may have a FILE-MANAGER Option to COPY / PASTE your entire SHOP Directory, with ALL IT'S CONTENT, exept for ANY (not needed) CACHE CONTENT (vqmod/vqcache/...) (v.1.x system/cache/...) (v.2.x system/storage/cache/...) (image/cache/...), into another Subdirectory. If you don't have this Function available, you need to download the entire SHOP Folder by use of an FTP-Client, and re-upload it to another Subdirectory.
EXEPT FOR BOTH config.php Files, and the .htaccess file, wich have to be rewritten, in Part, as explained further down below, and uploaded, after beeing modified, to the new Store Sub. You have to download those 3 Files in any Case, to rewrite them, to match the new Shop Subdirectories as well as it's new HTTP URL + DB-Name.
Then, in your Server MySQL-Admin Section, you FIRST need to create a NEW, virgin DB. Because I was not able, on my Server, to automatically CREATE a new DB, by use of the 'COPY/PASTE DB into a NEW DB' Function, actually offering/including this (selectable) Option, therefore, I just created a new One, the REGULAR WAY. Try it, it may work, on your Server, it depends on the Hoster, wich way you will be able to create it easier, just DO NOT IGNORE to set the correct DB Prefix (oc_ - or whatever you use/have...), it's upmost important, to make the DB work !...

So, COPY/PASTE your existing SHOP DB into this new DB, by use of the above mentioned function in the MySQL-Admin, as shown on the image, shown on the Post, linked below.
http://forum.opencart.com/viewtopic.php ... 78#p581784
Then, you REWRITE your existing BOTH config.php Files, to be copied/uploaded to your NEW SHOP SUB, to match the NEW SITE URL as well as the SERVER PATHS, to match the new Subdirectory, AS WELL, as the new DB NAME, eventually access credentials as well, if you defined a new DB-User Name or DB-Password as well, for this new DB...
Sample NewShop Site config.php:
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.yournewshop.com/newshop/');
...
...
// HTTPS
define('HTTPS_SERVER', 'http://www.yournewshop.com/newshop/');
...
...
// DIR
define('DIR_APPLICATION', '/home/jacob/www/yournewshop/newshop/catalog/');
define('DIR_SYSTEM', '/home/jacob/www/yournewshop/newshop/system/');
...
...
// DB
...
...
define('DB_DATABASE', 'jacob_newshop');
define('DB_PREFIX', 'oc_');
# SEO URL Settings, update RewriteBase / (possibly linked as: RewriteBase /shop/ in your first shop)
# if Store URL: yournewshop.com/newshop/, then Update to: RewriteBase /newshop/
Code: Select all
RewriteEngine On
RewriteBase /newshop/
THEN, make sure, VQMOD will function, if it had been installed already in your OLD SHOP, by using
Code: Select all
http://yournewshop.com/newshop/vqmod/install/

THEN, if you have everything done correctly, your new shop will be functional! I do it on a regular scale,
this way, to test new things, without disturbing existing Test-Installations!
Good Luck

Ernie
bigmax.ch/shop/
Last edited by IP_CAM on Sat Oct 17, 2015 10:15 pm, edited 1 time in total.
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Hey Ernie,
Your post is a great start for myself too.
I'm not sure if I'm essentially asking the same question... but I want to duplicate everything for a dev site. (full modules, vqmod, theme, products, orders, the lot!)
Can I follow your post too? Not sure whether to do it with XAMPP or create a sub-folder on my VPS.
I'm using OpenCart 2.0.1.1
Any opinions?
Thanks
Sam
Your post is a great start for myself too.
I'm not sure if I'm essentially asking the same question... but I want to duplicate everything for a dev site. (full modules, vqmod, theme, products, orders, the lot!)
Can I follow your post too? Not sure whether to do it with XAMPP or create a sub-folder on my VPS.
I'm using OpenCart 2.0.1.1
Any opinions?
Thanks
Sam
Who is online
Users browsing this forum: No registered users and 54 guests