"Create Store Group" programmatically in magento 1.6
To create store group use model "Mage_Core_Model_Store_Group". You will need to specify Website Id, Store Name and Root Category Id.
Website Id - Store will be associated under this website.
Store Name - Name of your store. eg. mystore
Root Category Id - Root Category will be used for this store.
You can use following script to create store group in magento v1.6.
$websiteId = "2"; // "Create Website" programatically $website->getId(); $rootCategoryId = "4"; // "Create Root Category" programatically $category->getId(); $storeName = "mystore"; // Create Store Group Object $storeGroup = Mage::getModel('core/store_group'); try { $storeGroup->setWebsiteId($websiteId) ->setName($storeName) ->setRootCategoryId($rootCategoryId) ->save(); } catch (Exception $e){ echo $e->getMessage(); }
Tutorial may help you:
Create Website programatically in magento
Create Root Category programatically in magento
Created At: 22 November, 2024
Views: 4,332
Social Sharing
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015