15

You can read this. It explains a lot but it's mostly for API V1. To show you how you can create an API I think it's better to offer an example. Let's say you have a module named Easylife_Portfolio with an entity named Project. For this entity you can set the name, description and status. Here are the files you need in addition to the rest of the files (...


14

Short answer: Every controller action has an associated layout handle and the handle is a string which relates to the module, the controller and the action for the current request (and is therefore unique to requests which reach that action). When you load and then render the layout in the controller action, all of the blocks for that handle are rendered ...


14

There's a series of changes you need to make in addition to just running the patch. I've used the 1.9.1.1 patch as an example here, but sadly, the patches differ dependent on release. Custom template files If you have modified or overridden the base/default template with your own package/design, then you'll need to manually apply the patches as necessary to ...


13

The usual cause when you get MySQL server has gone away is timeout errors and max_allowed_packet being set too low. These are settings that will have to be made to your system’s my.cnf file by your hosting provider. MySQL Server has gone away causes from MySQL.com The connection to your MySQL server is timing out due a PHP script taking too long to execute,...


11

The <depends> tag should be used if you create a module that impacts an other one. For example if you create something that affects the products you should add in your declaration file (app/etc/modules/Namespace_Module.xml) this: <depends> <Mage_Catalog /> </depends> This insures that your module configuration will be loaded ...


9

Possibly a little late for this, but.... There's a thread on the Magento forums here: http://www.magentocommerce.com/boards/viewthread/9594/ If you look at the code for Mage_Sales_Model_Order_Shipment_Api, the confirmation email is being sent out as part of the create() function. Then, the tracking details are added later with a call to addTrack(), but by ...


8

Output You're redirecting output to log files - that's fine - but those logs may become bloated over time or full of warnings and errors that you have no intention of looking at. At minimum configure these files with a standard .log extension in /var/log/ and configure a logrotate job to compress them after some time. However, I don't redirect output at ...


7

You have to check also the subscription status: if(Mage::getSingleton('customer/session')->isLoggedIn()){ $email = Mage::getSingleton('customer/session')->getCustomer()->getData('email'); $subscriber = Mage::getModel('newsletter/subscriber')->loadByEmail($email); if($subscriber->getId()) { $...


7

Unfortunately the example did not fit into one answer. Here are the rest of the files you need: Now we are done with the XMLs. Let's get to the code: app/code/local/Easylife/Portfolio/Model/Project/Api.php - model for handling the Api v1 requests (and some V2 requests) <?php class Easylife_Portfolio_Model_Project_Api extends ...


7

Here is resources what we have so far for migration to Magento 2: Official migration M1 to M2 guide - http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html Official data migration tool - https://github.com/magento/data-migration-tool-ce Official tool for extensions code migration help - https://github.com/magento/code-migration Various ...


6

Here are a couple of things to try: Manually delete the var/cache folder contents. Check you don't have compilation enabled Check that you don't have APC enabled Check the App.php still exists under app/code/core/Mage/Core/Model and that you didn't accidentally changed the content. From your error log: Warning: include(): Failed opening 'Mage/Core/Model/...


6

The error basically tells us that Mage::getModel('easylife/easylife') doesn't return a valid class. Please make sure the file Ics/Easylife/Model/Easylife.php exists and looks somewhat like the code posted below, this should give you access to the resource model. class Ics_Easylife_Model_Easylife extends Mage_Core_Model_Abstract { public function ...


6

I don't like that method of providing your own frontName, I prefer to overload the existing admin router because it's neat and quick. Start by changing this in your config.xml: <admin> <routers> <adminhtml> <args> <modules> <ics_easylife before="Mage_Adminhtml">...


6

To get Rating Array Try the Below Code. $prod=Mage::getSingleton('catalog/product')->load('your Prodouct Id'); $productId = $prod->getId(); $reviews = Mage::getModel('review/review') ->getResourceCollection() ->addStoreFilter(Mage::app()->getStore()->getId()) ->addEntityFilter('product', $productId) ...


6

You are pretty close to the answer already. Mage_Eav_Model_Entity_Setup::addAttribute() contains a check itself to determine whether the operation is an insert or an update: public function addAttribute($entityTypeId, $code, array $attr) { $entityTypeId = $this->getEntityTypeId($entityTypeId); $data = array_merge( array( '...


5

First clear the cache. Then check if the file app/etc/modules/Study_Screen.xml exists. I think it does, but check it to be sure. I also see there is a space at the beginning of your config.xml: before <?xml version="1.0"?>. remove that (and maybe clear the cache again). [EDIT] I've test your code. Here is the problem: in config.xml you have this line ...


5

If you are facing this problem, You have to commment the line in .htaccess file. # RewriteBase /magento/ or Set the RewriteBase in .htaccess file. RewriteBase / I have tested this in Magento 2


5

You should create your own module for this with the product sku/id as a parameter. Code might look something like this: $id = '100'; // Get the id with $this->getRequest()->getParam('id') $qty = '2'; // Replace qty with your qty $_product = Mage::getModel('catalog/product')->load($id); $cart = Mage::getModel('checkout/cart'); $cart->init(); $...


5

Try this: <a href="{{store direct_url="" _secure=1}}">Some text</a> if that does not work try <a href="{{store direct_url="" _force_secure=1}}">Some text</a>


5

As you may have noticed in the given source code, the exception is thrown because null is not an allowed value for $contentType. $contentType is read from the system configuration: $contentType = $this->getConfigData('content_type'); It is as simple as changing the system configuration setting to one of the allowed values. This can be done for instance ...


5

"The data migration tool takes advantage of such backward compatibility in Magento to automatically migrate Customer password from Magento 1 to Magento 2. So your customers can use their md5() based password without the need to reset their passwords after migration. " Meaning they can log in with their md5 password ? I tried, to no avail.


4

config.xml <global> <events> <sales_order_payment_pay> <observers> <some_module_node> <class>Some_Module_Model_Observer</class> <method>salesOrderPaymentPay</method> </some_module_node> </...


4

In my opinion none of the above answers are very convenient in that they either don't check if the customer is actually subscribed or don't handle the case where a subscription has not been found, so here goes: $customerIsSubscribed = false; $customer = Mage::getSingleton('customer/session')->getCustomer(); if ($customer) { $customerEmail = $customer-...


4

Looking at the Mage_Sales_Model_Order_Shipment_Api_V2 class you should use the following format for the itemsQty array (as in the WS-I compliance mode example): array('order_item_id' => '8', 'qty' => '1'); If the array is missing the keys order_item_id or qty it will ignore the specified rows in the function _prepareItemQtyData and when all rows are ...


4

Firstly, yes, an observer would be the best way, but it can also be done via rewrites. I personally always try to achieve my customization via observers, as it allows for a much higher module compatibility. How to obtain the correct event: Stay away from the multitude of 'event lists' available, all over the place. They are generally dated, and in most ...


4

The folder in app/local has nothing to do with your theme. Your template & layout files need to be placed in app/design/frontend/test/default/template/ and app/design/frontend/test/default/layout/. Your js, css and images need to be placed in skin/frontend/test/default/. After having these set up you need to set in System->configuration->design the ...


4

Found the solution myself: You need to set the start date for the banners 1 day earlier than the day you created the slider.


4

Surely the release notes should speak for themselves, there have been a whole bunch of security, performance and functionality improvements released over time and there is no one single answer that is suitable for this question. Release Notes Magento Community Edition (CE) Release Notes (1.8 and later) There have been many releases which have a high ...


4

The first thing I noticed was that the search returns an 301 redirect with the HTTP header Content-Type: text/html; charset=iso-8859-1 and the wrong URL http://caserisimo.mx/catalogsearch/result?q=br%25C3%25B3coli. Your search result page has the correct UTF-8 content type. I guess you want to find out where that redirect is coming from.


4

You have a typo: Mage:log($error_message); should be: Mage::log($error_message); Note the extra :.


Only top voted, non community-wiki answers of a minimum length are eligible