Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

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

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-20-2014, 06:39 PM
 
s4tnav s4tnav is offline
 

Member
  
Join Date: Sep 2014
Posts: 12
 

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

Hi Everyone,

Just wondering how (or if it's possible) to Move a Root Category (& Sub categories under it) to a Sub Category.

IE:

Currently:
-Category 1
--Sub 1
--Sub 2
-Category 2

Proposed:
-Category 2
--Category 1
---Sub 1
---Sub 2


Thanks in Advance!
__________________
X-Cart 5 Business
Reply With Quote
  #2  
Old 11-24-2014, 05:16 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

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

Hi!

Sorry, but there is no way to move categories in X-Cart 5 at the moment. You can create new category structure and then remove old ones in order to achieve needed result.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 11-24-2014, 05:41 PM
 
s4tnav s4tnav is offline
 

Member
  
Join Date: Sep 2014
Posts: 12
 

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

Added my idea to an existing idea
http://ideas.x-cart.com/forums/229428-x-cart-5-x/suggestions/4860287-move-category
__________________
X-Cart 5 Business
Reply With Quote
  #4  
Old 11-25-2014, 06:15 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

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

Thank you!
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #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

The following 2 users thank qualiteam for this useful post:
ant99 (03-26-2015), s4tnav (02-18-2015)
  #6  
Old 02-18-2015, 04:58 PM
 
s4tnav s4tnav is offline
 

Member
  
Join Date: Sep 2014
Posts: 12
 

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

Works a Treat!
Thank you!
__________________
X-Cart 5 Business
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:46 PM.

   

 
X-Cart forums © 2001-2020