Menu
  • HOME
  • TAGS

Magento simplexml_load_string() error location

php,xml,magento

It's something related with /var/www/html/app/code/core/Mage/Core/Model/Layout/Update.php so I would edit that file and I would go to the line 450. Just before that line write: Mage::log(print_r($filename, true)); Make sure that your logging is enabled and refresh the page. After that, take a look to var/log/system.log. The last xml is probably what...

SQL Table Error Magento

php,sql,magento

It appears that your SQL comment syntax is incorrect. From a “-- ” sequence to the end of the line. In MySQL, the “-- ” (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and...

product list in category use unknown template

php,html,magento,templates,magento-1.9

without seeing its had to infer solution. possibilities are: 1) There can be an issue of improperly selected Magento Package. system->configuration->Design->Package 2) If you want to see which template using on Template Path hints system->configuration-> Developer -> Debug -> Template Path Hints select to on clear cache and refresh the...

Need more about magento basic

magento

You can easy learn i have searched it It's a great and simple tutorial which help you step by step(After covering this tutorial you will be able to handle admin panel of the magento) http://www.templatemonster.com/help/ecommerce/magento/magento-tutorials/ http://leveluptuts.com/tutorials/magento-community-tutorials...

Magento setShippingMethod('freeshipping_freeshipping') observer event

magento,magento-1.7,magento-1.8,magento-1.9

There no events is exits name of add_to_cart_before. You can use other event like: checkout_cart_save_before checkout_cart_add_product_complete etc ...

Category banner in a magento website

magento

You can try below code: $module = Mage::app()->getRequest()->getModuleName(); $contoller = Mage::app()->getRequest()->getControllerName(); if($module == 'catalog' && $contoller == 'category') { // Catgeory Banner Content } ...

multi site not showing the header/nav on one site [closed]

javascript,css,magento,navigation

There ar unclosed divs in Your header template and .header-container "eats" other tags. You should add three more </div> before .nav-container (I guess at the end of header template)

Always shows order status pending in Magento working in my localhost

magento

Goto system > configuration > payment methods > open the payment method that you are using > New Order Status > select the status you want > Click on save config. By default pending would be selected for the payment method that you are using. Hence, you are getting default...

Magento: What event would be best to observe for any update to the cart

magento

Here the cart events available in Magento 1.9 regarding the cart: checkout_cart_update_item_complete, checkout_cart_product_add_after, checkout_cart_update_items_before, checkout_cart_update_items_after, checkout_cart_save_before, checkout_cart_save_after, checkout_cart_product_update_after So I think the best for you is checkout_cart_save_before or checkout_cart_save_after, depending on what you exactly want to do....

Simple controller with Magento 1.8.0

php,magento,routing

Directory structure should look as follows: app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php app/code/local/Magentotutorial/Helloworld/etc/config.xml app/code/local/Magentotutorial/Helloworld/etc/config.xml): <?xml version="1.0"?> <config> <modules> <Magentotutorial_Helloworld> <version>0.1.0</version> </Magentotutorial_Helloworld> </modules> <frontend> <routers> <helloworld> <use>standard</use> <args>...

Unable to call magento admin controller

php,magento,e-commerce,magento-1.9

I finally found it the hard way that it's not good to create a module by yourself. If you make a mistake you could end up your precious time finding where things went wrong. Its best to install a module creator extension from Ultimate Module Creator or use a online...

How to add elements to a fieldset in magento horizontally rather than vertically

magento

In your Code return like <tr>...</tr><tr>..</tr>, so if you need to add custom css or js to achieve what you expected, or for($i=01; $i*5<60; $i++){ $time[$i]['value'] = $i*5; $time[$i]['label'] = $i*5; } $fieldset->addField('Time', 'checkboxes', array( 'label' => $this->__('Time'), 'name' => 'time[]', 'values' => $time, 'value' => '1', 'tabindex' => 1...

how to add slideshow in magento 1.7.0.2 front-end

magento

Please use this extension http://www.magentocommerce.com/magento-connect/responsive-banner-slider.html http://www.magentocommerce.com/magento-connect/free-youama-jquery-nivo-slider.html and follow there steps on extension page....

magento redirect particular category and its subcategory to homepage

.htaccess,magento,redirect

In Magento, it's wrong to do redirects in .htaccess, but most newbies still solve the issue this way.... Your problem is that category urls in Magento usually have .html extension, so try this: RedirectMatch 301 ^/shop-online.html$ http://www.domainname.com/index.php The correct way is to create a url rewrite. In the admin, go...

Magento Ignore Child Attributes in Layered Navigation

magento,attributes,layered

From magento's point of view you have 3 products (following exapmle) air condenser(1), coil(2), bundle of 1 and 2(3). If you only want the bundled products info to appear then in 'manage products' select the air condenser or coil. Once in the 'edit product' form find the field for 'visibility'...

You don't have permission to access /magento/

.htaccess,magento

This looks like file permission issue. Check if your web server has the rights to read and execute on that magento folder.

Magento: Is a certain product in the cart?

php,magento

Fetch all data from checkout session and check your product exits in Current session $quote = Mage::getSingleton('checkout/session')->getQuote(); $foundInCart = false; foreach($quote->getAllVisibleItems() as $item) { if ($item->getData('sku') == $_sku) { $foundInCart = true; break; } } it really bad to Check by sku. Because of whenever configurable product cart then simple...

Magento - How to create different weight-price drop down in products

php,magento,magento-1.9.1

You can manage this by creating Custom Option for the products in Magento

how to get checkout cart specific item totat price?

magento,checkout

you can calculate the price as <?php $items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems(); foreach($items as $item) { $qty = $item->getQty() ; $price = $item->getPrice(); $totalPrice = $qty * $price; }?>...

Arabic words in invoice pdf print Magento

magento,pdf,tcpdf,arabic

1) Don't edit core files. 2) There are multiple invoice generators in magento: invoice from the backend, invoice on success page etc. So make sure that you are editing and testing the right one. The example below works for invoices in the backend. 3) There may be custom modules that...

Magento payment bridge with CURLOPT_SSL_CIPHER_LIST

php,magento,curl

Edit app/code/local/Enterprise/Pbridge/Model/Pbridge/Api/Abstract.php and added code as below for temporary fix; protected function _call(array $request) { $response = null; $debugData = array('request' => $request); try { $http = new Varien_Http_Adapter_Curl(); $config = array('timeout' => 60); $http->setConfig($config); $http->addOption(CURLOPT_SSL_CIPHER_LIST, 'rsa_rc4_128_sha'); $http->write(

How to customize the left side-bar in Magento 1.9 category view

magento,sidebar

You should do this with XML, by updating your local.xml file. <catalog_category_default> <reference name="left"> <remove name="left.newsletter"/> </reference> <catalog_category_default> Refernce for removing common items in Magento: http://myphpinformation.blogspot.in/2015/05/remove-default-magneto-block-like-news.html...

Add custom code to right sidebar on advanced search result page

magento

You just edit that static block content and at the bottom add the following code {{block type="core/template" template="catalogsearch/advanced/resultpagelinks.phtml"}} Create catalogsearch/advanced/resultpagelinks.phtml file in the correct path and produce your dynamic links in this. In this file, if you need you will get the search results block data by calling Mage::app()->getLayout()->getBlock('catalogsearch/advanced_result') For...

Paypal response avscode (Master Card) is always “X”

php,magento,paypal,paypal-sandbox

Cards, and therefore AVS verification, are not real in the sandbox. AVS is a check that the card issuer makes against the billing address on the card, not a check that PayPal makes against PayPal account addresses (note that PayPal accounts don't even a "billing address" per se). No (real)...

Magento call event after import product

magento

If you want to see a list of events in your system do a grep on the app folder for this term: protected $_eventPrefix. The closest I could get to your event was in /app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php file. Where event prefix is defined as: protected $_eventPrefix = 'catalog_product_import'; You will need to...

Error Magento 1.9 - You cannot define a correlation name 'ce' more than once [closed]

php,magento

It appears your new theme also includef at least one module -- this is a common thing. This module (Magentothem_Layerednavigationajax) has rewritten the main controller for this particular request. The controller action likely has some custom functionality. It all appears you have a second module on your system (Cybage_Marketplace). This...

meaning and location of string inside Magento's Mage:getSingleton

magento,singleton

1/ Model You have to know that Mage::getSingleton() is going to send you a singleton (which is a common development design pattern). For magento, only Models can be instantiated as a Singleton Snippet from app/Mage.php where you can see that Magento is actually using getModel behind the scene, and also...

Magento saveOrderAction() ajax response xx{“success”:true,“error”:false}

ajax,magento,magento-1.7,checkout

I had the same problem starting last Friday. I implemented the following solution and it removed the xx from the output: http://www.blog.magepsycho.com/tag/onepage-checkout-issue/ Also, run a scan at the following: https://shoplift.byte.nl/ - this may have had something to do with my problem. Still figuring that one out....

How to retrieve product list in json format based on category id ? [Magento] [Solved]

json,magento

I found a possible solution from Magento SOAP API for this. Refer the following link. http://www.magentocommerce.com/api/soap/catalog/catalogCategory/catalog_category.assignedProducts.html...

Magento: Allow duplicate products in Collection

magento

So I got this working by overriding lib\Varien\Data\Collection.php in my local folder. I changed the first snippet in the question to this: if (isset($this->_items[$itemId])) { $this->_items[] = $item; //throw new Exception('Item ('.get_class($item).') with the same id "'.$item->getId().'" already exist'); } This line "$this->_items[] = $item;" borrows the logic from _addItem...

Perform Some Action after Customer successful Login : Magento

magento,magento-1.8,magento-1.9

You need to use customer_login On the Mage_Customer_Model_Session model's method setCustomerAsLoggedIn() the event customer_login is dispatched. config.xml <customer_login> <observers> <yourobservername> <type>model</type> <class>yourmodule/path_to_class</class> <method>customerLogin</method> </yourobservername> </observers> </customer_login> and your Observer class YourCompany_YourModule_Model_Observer { public function customerLogin($observer) { $customer =...

Change theme based on param url

magento,events,observers

Yes, you could do that a number of different ways. That answer is not saying the URL params are inaccessible in the controller_action_predispatch event, however you might want to do it during an event like controller_action_layout_load_before instead and create custom layout handles from your param value. You can get them...

how to increase number of product on homepage in magento

php,magento

You need to change the settings in the Admin area. Go to System-> Configuration->Catalog->Frontend and change the number per page options and default. Products per Page on Grid Allowed Values Products per Page on Grid Default Value Reference: http://www.templatemonster.com/help/magento-how-to-change-default-amount-of-products-in-products-listing.html...

Get variables always in differnet .phtml templates

php,magento

Yes, using magento you should be able to create a view helper which can be called from within the view. You can check This tutorial which should give you everything you need to solve your problem...

Override Magento Contacts Controller

php,magento,magento-1.9

Best practices Your config.xml files seems like this <?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Mynamespace_CustomContacts> <version>0.1.0</version> </Mynamespace_CustomContacts> </modules> <frontend> <routers> <contacts> <args> <modules> <Mynamespace_CustomContacts before="Mage_Contacts">Mynamespace_CustomContacts</Mynamespace_CustomContacts> </modules> </args> </contacts> </routers>...

Magento : How to get category page URL keys for different store views?

php,magento,url

My Solution, works well /** * @var $store_id - The numeric ID of the store view to get the URL from. * @var $store_url - Base URL of the store */ $store_url = Mage::app()->getStore($store_id) ->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); $objcategory = Mage::registry('current_category'); $categoryId = $objcategory->getId(); $caturlkey = Mage::getModel('catalog/category') ->setStoreId($store_id)->load($categoryId)->getUrlKey(); $altUrl = $store_url.$caturlkey; ...

Magento module not calling install script, to create attribute for category

php,magento

First make below change in config.xml <modules> <Ddevs_Ebayaff> <version> 0.1.0 </version> </Ddevs_Ebayaff> </modules> <models> <modulename> <class>NameSpace_ModuleName_Model</class> <resourceModel>modulename_mysql4</resourceModel> </modulename> </models> <resources> <category_setup> <setup> <module>NameSpace_ModuleName</module> <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>...

Unable to add product to cart programmatically in Magento

php,magento,session

Since 1.8 you won't be able to add a product to the cart from a GET request alone, as you need to provide the form_key. You should be able to add a product to the cart using the following: form_key is the main thing to get right here. $params //should...

Create order sales_email_order_items html file

email,magento

You can enable the template path hints and then place an order, the template path hints will also be displayed in the email. Still you should have a look at this file app/design/frontend/base/default/template/email/order/items/order . Probably it might help you.

update local.xml with script in magento

xml,magento

Try this below code, and alter whatever you want. <?php $xmlFile = file_get_contents('Magen/app/etc/local.xml');// File you want to alter $xmlNodes = new SimpleXMLExtended($xmlFile); $xmlNodes->global->resources->default_setup->connection->dbname = NULL; $domNode = dom_import_simplexml($xmlNodes->global->resources->default_setup->connection->dbname); $ownerNode = $domNode->ownerDocument; $domNode->appendChild($ownerNode->createCDATASection('your_host_name')); //values you want to change...

How to bypass toHtml() To print html tags in Magento

php,html,magento

html_entity_decode did the trick! //I Added these two lines $breadcrumbblock = $this->getLayout()->getBlock('breadcrumbs')->toHtml(); echo html_entity_decode($breadcrumbblock); ...

Magento custom module Observer not working

php,magento

There are lots of issue in modules. As observer die() may be not works.Use Magento log print to check the observer work or not Module NameSpace Folder name should be start with upper letter mycustom to Mycustom. Also You need change class name respesctive code. Update: config.xml code : <?xml...

Magento custom extension isn't called in CMS page

php,magento

Moving the solution, provided by @VigneshBala in the comments, to an answer instead: There is a problem with the block declaration for promo/product_list in the layout. It looks like you have mistakenly put the template path in the as attribute, when it should be declared as template. Before <block type="promo/product_list"...

Css text/image wrap not working

html,css,magento

It's failing because you are not using the class .TextWrap anywhere in the code. Add that class to the paragraph that contain the images and it will be done: <p class="TextWrap"> <img title="Schwarzer cap-toe Oxford" src="{{media url="wysiwyg/OHNE.TEXT_Landingpage_1200pix_08.jpg"}}" alt="Schwarzer cap-toe Oxford" width="300" height="155" /> </p> You can see it on any...

Add percentage discount for individual product in magento

magento,shopping-cart,magento-1.9,magento-rules,magento-dev

You can set this using Catalog Price Rules. You can access this in backend from Top Navigation Promotions >> Catalog Price Rules. You can specify products valid for this rule using their attribute value. Here is the screenshot for this: ...

Magento how to check if Admin is logged in (Frontend)

php,magento

EDIT Apparently if session_save_path is "set" on memcache (it stores the session into memcache the session_save node is ignored and the session will be saved into memcache I have searched this question on the web(stackoverflow and magento stack have got some of these questions open), but with poor results except...

Third party helper override doesn't work

magento,rewrite,override,magento-1.7,helper

What you've written looks correct... is something else rewriting it perhaps? Add a _construct() method to Ess_M2ePro_Helper_Module_Renderer_Description with die(get_class($this)); and see what the class name is. If it is something else, you have some more work to do (which I can help with if need be), otherwise if it is...

Magento change onepage checkout page title

magento

Try this <reference name="head"> <action method="setTitle"><title>New Title</title></action> </reference> ...

Get custom attribute of products from observer order object Magento

magento

I believe, you're getting the items just fine, the problem is somewhere else. Collections don't have debug method, so if you look into your server logs, most likely you will find an error about that. So if you want to debug the items, you should do something like this: public...

Magento custom menu module not showing

magento,magento-1.9

Found a solution. Magento connect installs the files into the RWD folder by default. If, like me, you use a custom theme - copy skin/frontend/rwd/default/css/webandpeople/ to your theme folder. Hope this helps others....

Magento 1.8.0.0 - Worldpay payment response receiving 301 error

php,magento,redirect,response,worldpay

If anyone was wondering, we fixed this by upgrading the installation from 1.8.0.0 to the latest Magento 1.9.1.1 with all security patches.

Magento - how to translate message type

php,magento,translation

I solved this by wrapping $message->getType() in the translatable text output, like so: echo $this->__($message->getType()); For some reason, I don't need to do this for $message->getCode(), where the text is being translated somewhere else....

Custom Tabs does not show up in catalog product information

php,magento,magento-1.9

In order to register the custom tab in the new product and the edit product I changed my code to app/design/adminhtml/default/default/layout/customtabs.xml <?xml version="1.0"?> <layout> <adminhtml_catalog_product_new> <reference name="product_tabs"> <action method="addTab"> <name>my_custom_tab</name> <block>customtabs/adminhtml_catalog_product_tab</block> </action> </reference> </adminhtml_catalog_product_new> <adminhtml_catalog_product_edit>...

Error viewing images after enabling HHVM

magento,hhvm

I figured out the problem we had where the image disappeared when we enabled HHVM from control Panel. The problem is the memory limit in the .INI file was -1 and magneto GD2.php does not recognize -1 value in memory check function in GD2.php as in the code below (LINE...

'Select' 2 pieces of info (XSLT file)

magento,xslt,sage-erp

First of all, whitespace-only text nodes are ignored by the XSLT engine, so what you tried above can be rewritten like the following: <Company> <xsl:value-of select="billing_address/firstname, billing_address/lastname"/> </Company> Second, you have to understand that xsl:value-of generates a text node. The following will generate 2 text nodes, with resp. the first...

Solved - Long PHP script does not run completely

php,magento,integration

Unless you have an exceptionally large/inefficient database/queries running 1400 queries should not take so long that it times out. If possible, run the script as a cli script and see what is output and how long it takes to run (there is no max execution time on a cli script)....

Unable to convert Magento object array response to json format

php,mysql,arrays,json,magento

Try following : $jsonData = Mage::helper('core')->jsonEncode($facetColor->getData()); or $jsonData = json_encode($facetColor->getData()); Hope this helps!! ...

Magento Show 'plus shipping costs' on product view page next to price

magento,magento-1.9,shipping

There is no setting in the admin for this. You must edit your template file. Go into app/design/frontend/your-theme/template/catalog/view.phtml and add it there. ...

magento write to or read from session using db value

php,magento,session

Each module in Magento can have its own session object for saving namespaced values to/from the session. For example, to set the variable foo_bar in the "core" session namespace, all you need to do is call Mage::getSingleton('core/session')->setFooBar('Some Value'); To do the same thing in the "customer" session namespace, Mage::getSingleton('customer/session')->setFooBar('Some Value');...

How to always display the Product attribute label in English in the Additional information tabs in Magento

magento

I think you're better off using the attribute code instead of the attribute label if you just need an identifier. The attribute code is universal across all storeviews. <?php foreach ($_additional as $_data): ?> <?php $code = $this->escapeHtml($this->__($_data['code']))?> <tr class="<?php echo $code; ?>"> <th class="label"><?php echo $this->escapeHtml($_data['label']) ?></th> <td class="data"><?php...

Magento: Object not found in localhost

php,magento,localhost

Check you also downloaded the .htaccess file and mod-rewrite is enabled in your apache conf. To access to admin panel try: localhost/nameOfMyProject/index.php/admin...

Redirect in CheckOut

magento

Solved it Solution: Create an an Override for /app/code/core/Mage/Checkout/controllers/OnepageController.php This should be for example app/code/local/{NameSpace}/{ModuleName}/controllers/OnepageController.php Pay special attention to the "s" the folder is plural not singular. Took me ten minutes to see why my controller was not working. The controller should be build like this: require_once Mage::getModuleDir('controllers', "Mage_Checkout").DS."OnepageController.php"; class...

Magento jQuery / Prototype Issues in 1.9 After upgrade

jquery,magento,prototype,magento-1.9

This looks like jQuery and or prototype lib is missing or conflicting on your install. In your theme, you have to make sur that those 3 lines appear in first in the block of name head under the node <default> on the file app/design/frontend/your_package/your_theme/layout/page.xml and in that exact order. <action...

change custom product tab position in admin grid Magento

magento,tabs,position,admin,product

You can use the action addTabAfter instead of addTab, then you have to specify the <after> parameter (categories, websites, upsell...). I edited the code of your tutorial for example: <reference name="product_tabs"> <action method="addTabAfter"> <name>custom</name> <block>inchoo_customlinkedproducts/adminhtml_catalog_product_edit_tab</block> <after>upsell</after> </action> </reference> I hope this is fexible enough for you....

Magento: how to add a static block AFTER product list

magento,static-block

In your local.xml add the following, replacing cms_extra with the identifier of your CMS block. <!-- Catalog Category (Anchor) --> <catalog_category_layered> <reference name="content"> <block type="cms/block" name="cms_extra" after="category.products"> <action method="setBlockId"><block_id>cms_extra</block_id></action> </block> </reference> </catalog_category_layered> <!-- Catalog Category (Non-Anchor) --> <catalog_category_default> <reference...

Magento admin panel not working in chrome [duplicate]

google-chrome,magento

I have experienced similar issues when using magento and localhost urls. Try the following steps: Visit chrome://net-internals/#dns in your chrome browser and then click the "clear host cache" button. Make sure you clear your browser cookies for localhost. Clear your magento cache (just empty the var/cache folder) ...

Get Product Options for each Product in the Catalog in Magento

php,magento

To get the configurable options of whole catalog, try this $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*'); foreach ($collection as $product) { foreach ($product->getProductOptionsCollection() as $o) { $values = $o->getValues(); foreach ($values as $v) { $v['product_id'] = $product->getEntityId(); echo "<pre>";print_r($v->getData()); } } } ...

Check if radio button value is, then echo some HTML

javascript,php,html,magento

i hope this solution you want... <li> <div class="input-box"> <strong><?php echo $this->__('Would you recommend this product to a friend?') ?></strong> <?php foreach ( $this->getOptions() as $option ): ?> <label class="recommend"> <input type="radio" name="recommend" id="recommend_field<?php echo $option['value'] ?>" class="radio-gender" value="<?php echo $option['value'] ?>"<?php if ($option['value'] == $value) echo ' checked="checked"' ?>><?php...

Apache crashes on installing Magento extension

php,magento

I found the following solution on this link APPCRASH php-error-faulting-module-name-php5ts Go to following file C:\xampp\apache\conf\extra\httpd-xampp.conf Set Comment on following line. #LoadFile "D:/xampp/php/php5ts.dll" #LoadModule php5_module "D:/xampp/php/php5apache2_4.dll" #<FilesMatch "\.php$"> # SetHandler application/x-httpd-php #</FilesMatch> #<FilesMatch "\.phps$"> # SetHandler application/x-httpd-php-source #</FilesMatch> # # PHP-CGI setup # Uncomment the following line: <FilesMatch "\.php$">...

How to add custom tab to CMS selection in magento admin menu

php,magento,magento-1.9

Write this code in your module config.xml file. <config> <adminhtml> <menu> <cms> <children> <feedback module="feedback"> <title>Feedback</title> <sort_order>10</sort_order> <action>feedback/adminhtml_feedback</action> </feedback > </children> </cms> </menu> </adminhtml> </config> ...

Magento - Display a custom text in product page, only for products from specific categories

php,magento

To display text on more than 1 specific categories, simply do the following: Create an array of all category ids in which you want to show this text. For example: $arr = array(19, 120, 121, 122); Now in place of if($category->getId()==119): put the following code: if(in_array($category->getId(),$arr)): Please let me know...

How to pass an EAV value to the Paypal payment information

php,magento,paypal,magento-1.9

You can try to override the class Mage_Paypal_Block_Standard_Redirect into something like this: protected function _toHtml() { $standard = Mage::getModel('paypal/standard'); //... foreach ($standard->getStandardCheckoutFormFields() as $field=>$value) { if ($field == 'REASON_CODE') { $myvalue = Mage::getSingleton('customer/session')->getCustomer()->getMyvalue(); $value .= $myvalue; } $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); } //... return $html; } I have added a...

Why has overriding password hashing caused urls to break in magento admin?

php,magento,url-routing

The encrypt/decrypt functions of Mage_Core_Model_Encryption are not used in urls. Basically, there are two ways to solve the conflict. One being to implement the new hash based on using an event observer on the customer authentication methods. The other method, the one which works better for me is to just...

How do I configure a Magento .csv import with a custom column name?

magento,csv,import

you need to create an attribute with attribute_code shoe_size in your admin, and rename the column to shoe_size. also, make sure all attribute option values are loaded in admin.

Replace Product Names with a Loop

php,magento

Create a file Replacename.php inside your magento root folder and write the below code in that file and then execute it with below URL http://www.yourdomain.com/Replacename.php <?php require_once('app/Mage.php'); umask(0); Mage::app(); $_productCollection = Mage::getModel('catalog/product') ->getCollection()->addAttributeToSelect('*'); foreach($_productCollection as $_product) { try { $name = $_product->getName(); $new = str_replace("PRODUCT","Article", $name); $_product->setName($new); $_product->save(); } catch(Exception...

cannot find method getExportedKeys( ) in Magento

magento

Without any context, my best guess is that this is just using the inherited Varien_Object getter (i.e. __call()). Look for setExportedKeys() and you will probably find the source of the data. This is a common pattern in Object Oriented Programming. By having all your objects of a particular type share...

display product label on “out of stock ” products in magento site

image,magento,magento-1.9

To display the "out of stock" label on product view page, write the below code in the file app/design/frontend/rwd/default/template/catalog/product/view.phtml $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product); $qty $stock->getQty(); if($qty <= 0) { <span class="out-of-stock"><span>Sold Out</span></span> } And if you want the label on the category page, write in app/design/frontend/rwd/default/template/catalog/product/list.phtml NOTE : It is assumed...

Get images out of product description in phtml file

php,html,magento

It doesn't work because it was not planned for the product description to have such media call: {{media url="wysywig/Banner/image.jpg"}} However there is nothing wrong doing this, to make it work, you have to filter your description with a widget function: echo Mage::getSingleton('widget/template_filter')->filter($description); ...

Javascript Conflict in Magento

javascript,jquery,magento,calendar

In your local.xml file, first remove all the js files from the page (using handler - controller), and then again add in the correct order that you want. This will solve any dependency conflict issues.

How to create custom adminhtml theme magento

magento

try this : <?xml version="1.0"?> <config> <modules> <Foo_myTheme> <version>0.0.1</version> </Foo_myTheme> </modules> <stores> <admin> <design> <package> <name>default</name> </package> <theme> <template>myTheme</template> <skin>myTheme</skin> <layout>myTheme</layout> </theme> </design> </admin> </stores> </config> ...

Run Magento 1.9.1.0 Dataflow Import Profile Programmatically

php,xml,magento,import,dataflow

After much frustration, here's the answer that works: Note that in this case I've configured the default Magento Dataflow Profile for Import All Products (ID: 3) to read in an XML import format, from a predefined file. This is a file I create as needed prior to running the import...

Magento custome option product in search result

magento

You shouldn't use custom options for different sizes. This is why you have configurable products. You make a configurable product and then link it to simple products which represent its sizes. Then for the simple product you select visibility: search (to show it on search). Custom product options are NOT...

Set Magento Product Group Permissions Programatically

php,magento

Found where the data is stored in the database and just ended up modifying the database directly. $groupsDisabledArray is an array that contains an ID for each group I want to disable product permissions for. The data in magento is simply stored as a comma separated list of Group ID's...

Magento: Add dynamic code to head section in specific CMS Page

php,html,magento,phtml

Add to the Layout Update XML field of your CMS page: <default> <reference name="head"> <block type="core/template" name="headerInsert" template="yourthemepath/headerInsert.phtml"/> </reference> </default> ...

Magento: How to load js in admin panel

javascript,php,jquery,xml,magento

app / design / adminhtml / verdapay / layout / local.xml <-- This location won't work. app/design/adminhtml/verdapay/default/layout/local.xml...

I am facing issues in radios validation in magento

php,magento

change 'class' => 'required-entry', to 'class' => 'validate-one-required-by-name', hope this will work for you.....

Magento add a column to sales_flat_quote table and add data

mysql,magento

Open database and fire this SQL: Alter table sales_flat_quote Add paypal_status tinyint(1) NOT NULL DEFAULT 1; Alternatively, you can write following in your SQL file (located at CompanyName\MyModuleName\sql\companyname_modulename_setup) of your custom module. This file will get executed only one time , that is the first time when the module is...

Showcase website that will reinstall itself every day?

magento,cron,cron-task

There are two good solutions: 1. Virtual Machine Run the entire site in a virtual machine or VPS. Make a snapshot of the machine when it is in the state you want to reset it to. Have a cronjob that triggers the "return to snapshot" routine. The exact details vary...

How to upload multiple pdf file to Magento Manufacturer

php,magento

I have customize this plugin as I need I have add this code in plugin form.php file $connection = Mage::getSingleton('core/resource')->getConnection('core_read'); $select = $connection->select() ->from('manufacturer_pdf', array('*')) // select * from tablename or use array('id','title') selected values ->where('menufecturer_name=?',Mage::registry('manufacturer_data')->getData('menufecturer_name')) // where id =1 ->group('pdfname'); // group by title $_SESSION['adminmanufacuterquery']=$rowsArray =...

Get Order Details by Order Id

magento,search,order,magento-1.9

In magento every order has two IDs Order ID - is Magento internal order ID Order Increment ID - is the ID display on communicate (email, etc) with your customer See Confusion with order id, order increment id and I am not getting order id as 20001201 To load order...

Magento system.log keeps writing even if it is disabled

magento

Magento Admin > System > Configuration > Developer > Log Settings and set the «Enabled» option to No. Make sure you are setting this option for all stores and websites. Check if you have not left something like this in your code: Mage::log(''); Clear all caches. Delete existing system.log or...