View Single Post
  #5  
Old 11-25-2014, 07:16 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Any way to Move a Root Category (& Sub Categories) to a Sub Category?

Hi,

If you OK with doing some hacks, this may help you.

NOTE: these hacks may crash your website. So, please CREATE A BACKUP of your site and TRY THE HACKS ON A LOCAL COPY of your website before uploading changes to your "live" server.

1. Use PHPMyAdmin or the MySQL console and search the xc_categories table for the category where you want to move other categories into. Remember its id.

2. In the xc_categories table, update categories which you want to move and set their parent_id to the id of the category from the 1st step.

3. Create and run (from the SSH console, or from your browser) the following script from the directory where X-Cart is installed:

Code:
<?php require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'top.inc.php'); \XLite\Core\Database::getRepo('XLite\Model\Category')->correctCategoriesStructure();
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote