"Create Store View" programmatically in magento 1.6
To create store view use model "Mage_Core_Model_Store". You will need to specify Website Id, Store Group Id, Store View Name, Store View Code and Status.
Website Id - Store will be associated under this website.
Store Group Id - Store view will be associated under this store.
Store View Name - Name of your store view. eg. english
Store View Code - Code for this store view.
You can use following script to create store view in magento v1.6.
$websiteId = 2; // "Create website" programatically $website->getId(); or $storeGroup->getWebsiteId(); $storeGroupId = 3; // "Create Store Group" programatically $storeGroup->getId(); $storeViewName = "english"; $storeViewCode = "english"; // Create store object $store = Mage::getModel('core/store'); try { $store->setCode($storeViewCode) ->setWebsiteId($websiteId) ->setGroupId($storeGroupId) ->setName($storeViewName) ->setIsActive(1) ->save(); } catch (Exception $e){ echo $e->getMessage(); }
Tutorial may help you:
Create website programatically
Create Store Group programatically in magento
Create Root Category programatically in magento
Created At: 22 November, 2024
Views: 5,569
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