magento-1.9

Load Magento module template

陌路散爱 提交于 2019-12-11 21:14:26
问题 For a Magento module I need to load template file and let it replace the complete page. It is a XML file (but could also be any content whatsoever). Generally speaking when MYNS_MYMODULE_controllernameController is triggered and calls fooAction() I need to be able to display a clean site with the content from my template file. Please let me know where to place the template file and how to tell Magento to load this file as a root template without anything else around. Edit, to clarify it more:

How to Overriding Mage_Catalog_Block_Product_View_Options_Type_Select.php in Magento

不羁的心 提交于 2019-12-11 17:48:10
问题 I am new user of Magento (in customization). I want to override Mage_Catalog_Block_Product_View_Options_Type_Select.php file in local folder. Till I am doing overriding functionality. Please can any one suggest me which steps should I follow for override this file. And for overriding which other files need to add in local folder. 回答1: There are two way to do it if you want to just override block then copy that file from core to your local folder, please maintain the same folder structure as

Magento 1.9 change custom option value depending on stock number

我是研究僧i 提交于 2019-12-11 15:21:53
问题 I have custom code that determines if a custom code value exists and if it does to select this option over the default sort order option in the product config. What I am wanting to do is further add logic that if the product sku starts with "F" then it will show the default sort order value for that product. The custom code is in this file.. app\code\local\Mage\Catalog\Block\Product\View\Options\Type\Select.php Here is the code in question // Set Default for the following cases: // Ring Size

Magento: serialization error on caching Collection

喜欢而已 提交于 2019-12-11 13:57:01
问题 I wrote an extension in which a base abstract class contains a function that will extract a product collection: $cache = Mage::app()->getCache(); if(!$cache->load('itserv_feed_collection')) { $_productCollection = Mage::getModel('catalog/product')->getCollection(); $_productCollection->addAttributeToSelect('*'); $_productCollection->addAttributeToSelect('stock_status'); $_productCollection->addAttributeToSelect(Mage::getStoreConfig('feed_options/mappa_attributi/produttore')); $

Magento on PHP 7.2 wamp server

时光怂恿深爱的人放手 提交于 2019-12-11 12:49:08
问题 i am configuring an existing magento project on local system with WAMP server php version 7.2, while installing magento i get error "PHP extension "mcrypt" must be loaded." Problem is mycrypt is no longer supported in php 7.2, can anyone suggest how can i resolve it? 回答1: mcrypt has been moved from php to pecl since 7.2 You still can install it. Install dependencies gcc make autoconf libc-dev pkg-config install the lib itself libmcrypt-dev I assume php7.2 and pecl are installed so you just

Magento attribute dropdown with first empty value

天涯浪子 提交于 2019-12-11 12:12:54
问题 I want to show one dropdown with the values from product attribute. But always is showing the first position empty. I have 2 values but I don't know why the array have 3 positions <?php $options = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'tipo_paquete')->getSource()->getAllOptions(); var_dump($options); ?> <select id="tipo_paquete" class="required select" name="tipo_paquete"> <option value=""><?php echo $helper->__('--Please Select--')?></option> <?php foreach (

Magento: “Image does not exist”

♀尐吖头ヾ 提交于 2019-12-11 08:46:32
问题 I'm importing a CSV file in Magento (version 1.9). I receive the error: 'Image does not exist'. I've tried to do everything I could find on the internet. The template I'm using for upload is the default template taken from my export folder. I've added the / before the image name and I've also saved the file as UTF-8 format. Any advice would help. 回答1: Use advanced profiler System > Import/Export > Dataflow – Profiles You only need to include the attributes that are required, which is just the

Magento Upgrade 1.7 > 1.9 DB Issue

浪尽此生 提交于 2019-12-11 07:39:32
问题 I upgraded Magento 1.7 to 1.9 and after upgrade the add-to-cart doesn't work anymore. It is not connected to the form_key! Why i think it is a database issue: I used clean magento 1.9 with clean database and created one product, add-to-cart works fine. I connected this magento with the database i upgraded and add-to-cart didn't work. So clean Magento with "old" database doesn't work on add-to-cart. Has anyone an idea how to solve this? I don't really want to use a clean database and move data

Sales order grid Filter & Sorting not working in Magento

删除回忆录丶 提交于 2019-12-11 07:39:18
问题 I would like to show the customer email in Magento sales order grid. I have to rewrite the Mage_Adminhtml_Block_Sales_Order_Grid in my local module to added the new column for customer email. I got the value of email for each order but sorting and filtering not working as expected. I was spent more than a day for sorting this issue but no luck. Also, I referred few of answers in SO too. Below is the code which is I have tried referring this answer, public function setCollection($collection) {

C# How do I add customer data using SOAP V2 in HTTPS (Magento 1.9.3.3)

こ雲淡風輕ζ 提交于 2019-12-11 07:18:34
问题 I'm developing a C# winapp to add customer data to Magento server. My server is using Magento 1.9.3.3. I have a problem when I tried to add data to the server, using https protocol. The code below works flawlessly if using http . This is my App.config file. <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="httpsBinding" allowCookies="true" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"> <readerQuotas