You can Manage opencart enable/disable maintenance flag on the site through admin.
Go To Admin >> System >> Setting >> “select store and edit it”.
After that you go “Server” tab and select enable/disable maintenance flag here
You can Manage opencart enable/disable maintenance flag on the site through admin.
Go To Admin >> System >> Setting >> “select store and edit it”.
After that you go “Server” tab and select enable/disable maintenance flag here
Paste below code to .htaccess file (.htaccess file present in root folder) and remove forcefully index.php from url.
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
Default magento does not show the drop down in layer navigation. you need to code for this functionality. Please follow the below step to achieve the display drop down in layer navigation.
Go to this file path /app/design/frontend/default/YOUR-THEME/template/catalog/layer/filter.phtml if you could not find the file from this path , than copy file from Base directory to your local theme. /app/design/frontend/base/default/template/catalog/layer/filter.phtml Paste below code to filter.phtml file <select onchange="setLocation(this.value)"> <option value=""><?php echo 'Choose an Option...' ?></option> <?php foreach ($this->getItems() as $_item): ?> <?php if ($_item->getCount() > 0): ?> <option value="<?php echo $this->urlEscape($_item->getUrl()) ?>"> <?php echo $_item->getLabel() ?> <?php else: echo '->' . $_item->getLabel() ?> <?php endif; ?> (<?php echo $_item->getCount() ?>) </option> <?php endforeach ?> </select>
We can easily Create custom product with custom options in magento.
First we need to create a custom file in magento root directory. In this code I am create product.php file in root directory and paste below code. require_once 'app/Mage.php'; umask(0); $app = Mage::app(); //$session = Mage::getSingleton('customer/session', array('name'=>'frontend')); //create a new product try { $imageurl = Mage::getBaseDir('media').'/your_img_name.jpg'; $product = Mage::getModel('catalog/product'); $stockData = $product->getStockData(); $stockData['qty'] = 10; $stockData['is_in_stock'] = 1; $stockData['manage_stock'] = 1; $stockData['use_config_manage_stock'] = 0; $options = array(); $options = array( 'title' => 'Option Title’, 'type’ => 'radio’, 'is_require’ => 1, 'sort_order’ => 0, 'values’ => array() ); $options['values’][] = array( 'title’ => 'Option Value 1′, 'price’ => 0.00, 'price_type’ => 'fixed’, 'sku’ => '', 'sort_order’ => '1’ ); $options['values’][] = array( 'title’ => 'Option Value 2′, 'price’ => 89.00, 'price_type’ => 'fixed’, 'sku’ => '', 'sort_order’ => '1’ ); $product->setStoreId('default’) ->setTypeId('simple’) ->setAttributeSetId(4) ->setName('GTSProducts’) ->setDescription(“Gts magento test description”) ->setShortDescription(“Gts magento test short description”) ->setSku('gts') ->setWeight(1.0) ->setStatus(1) ->setVisibility(4) ->setPrice(19) ->addImageToMediaGallery($imageurl ,array('thumbnail’,’small_image’,’image’) ,true,false) ->setTaxClassId(0) ->setStockData($stockData) ->setCategoryIds('3′) ->setHasOptions(1) ->setProductOptions(array($options)) ->setCanSaveCustomOptions(true) ->save(); echo 'OK Product ID: '.$product->getId(); $cache = Mage::getSingleton('core/cache’); $cache->flush(); } catch (Mage_Core_Exception $e) { echo $e->getMessage(); } catch (Exception $e) { echo $e; }
To know more about magento directory path here
Magento add programatically Product image or addImageToMediaGallery
When,I am going to login on magento connect with valid credentials. it through an error “Invalid login credentials”.
Please go to Root folder of your Magento project. and than edit this file.. /downloader/connect.cfg In this file lookup ftp://[username]:[pass]@[host]/[path-to-webfolder]/”;s:9:”sync_pear”;b:0;} Check if [username], [pass] and [host] and [path-to-webfolder] corresponds to what it should be to logon via ftp to your server.