magento

Magento 2 - REST API PUT product

一个人想着一个人 提交于 2020-01-23 06:19:05
问题 When I try to update a product, created via the REST V1 API, only the values are updated for de default website. Unfortunattely I can't find any possibility to send website id's within te json. Does anyone have experienced this before? The data I send for the update to /V1/products/123456: {"product":{"sku":"123456","name":"D4D0123299","price":21,"type_id":"simple","custom_attributes":[],"extension_attributes":{"stock_item":{"use_config_manage_stock":1}}}}" Linking the product to specific

How to cache a collection in Magento?

孤者浪人 提交于 2020-01-23 05:50:08
问题 I have a collection that takes significant time to load. What I would like is to cache it (APC, Memcache). It is not possible to cache the entire object (as it cannot be unserialized and it is over 1 MB). I'm thinking that caching the collection data ($col->getData() ) is the way to go, but I found no way to rebuild the object based on this array. Any clues? 回答1: Collections already have some caching built in but they need a little prompting so put this in the constructor of a collection:

Magento Connect install Error moving uploaded file

大憨熊 提交于 2020-01-23 03:56:33
问题 I have problem with magento connect. i am not able to install any downloaded packages of magento extensions like mailchimp, onestep checkout package. While i am uploading package, its shows error like Error moving uploaded file i dont know what to do. please help me.. Thanks 回答1: The solution to this problem is to set all folders permission to 777. Go to your installation root folder and run the following command (You should have access to SSH on your server to run this command):- find .

Magento + JQuery + Ajax - How do I reload just parts of my custom Module instead of the whole Block?

偶尔善良 提交于 2020-01-23 02:58:28
问题 I was just recently given the task to create a simple Product configurator for our Magento Template in 5 days, where you can choose some attributes and it calculates the price for you, fades over a new image and changes the add to cart button to the new product. Before this I had no experience in PHP or JQuery and just some basics in Magento (never done a custom module before.) My only programming Background is OOP Games in Action Script 3. So far my code works somehow. I have some variables

Magento : How do i echo username

我的梦境 提交于 2020-01-23 01:14:07
问题 I use the modern theme I have a livechat button on the header and i want to parse informations in my template This is the livechat button : <!-- http://www.LiveZilla.net Chat Button Link Code --><a href="[removed]void(window.open('http://xxxxxx.fr/livezilla.php?code=BOUTIQUE&en=<!!CUSTOMER NAME!!>&ee=<!!!CUSTOMER EMAIL!!>......... I need to replace and to the name and the email of the user (if logged) The button is in the header of my homepage How do i echo this two informations ? I tried <

Filtering a joined column

给你一囗甜甜゛ 提交于 2020-01-22 12:32:07
问题 I am creating a stock report in the admin and have everything working so far, except that I can't seem to be able to filter on the joined column. I have joined the stock information, using the following to grab my collection. $collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('name') ->addAttributeToSelect('sku') ->addAttributeToSelect('price') ->setStoreId($storeId); $collection->addFieldToFilter('type_id', 'simple'); // Add on the stock qty information

Magento - add WYSIWYG editor to custom widget

别来无恙 提交于 2020-01-21 03:19:14
问题 I created a widget inside my custom module. Everything is working and the widget can be embedded onto CMS pages. However, instead of a textarea parameter type I want to add a WYSIWYG editor. This is the significant part in my widget.xml: <parameters> <description translate="label"> <required>0</required> <visible>1</visible> <label>Description</label> <type>textarea</type> </description> </parameters> I wonder if there's a way to extend Magento's functionality to allow a WYSIWYG editor

How override model in Magento correctly?

馋奶兔 提交于 2020-01-20 08:09:26
问题 guys. I need to override 2 functions in different classes (CatalogSearch/Layer.php and CatalogSearch/Mysql4/Fulltext/Collection.php). So, I have a config file: <config> <modules> <my_modulename> <version>0.1</version> </my_modulename> </modules> <global> <models> <catalogsearch> <rewrite> <layer>My_Modulename_Model_CatalogSearch_Layer</layer> <mysql4_fulltext_collection>My_Modulename_Model_CatalogSearch_Mysql4_Fulltext_Collection </mysql4_fulltext_collection> </rewrite> </catalogsearch> <

How to get a product's image in Magento?

半腔热情 提交于 2020-01-18 21:33:49
问题 I'm running on version 1.3.2.1, but on my client's server they had Magento 1.3.0 so my previous code to display images for my local copy, echo $this->helper('catalog/image')->init($_product)->resize(163, 100); , does not work on the client's installation. Looking at the results returned by their Magento, version 1.3.0 actually returns a URL although it points to the skin's media folder. Is there a way to get the absolute image path for the image? Or should I make changes somewhere else that

Magento 1.7 Override Pdf Classes

血红的双手。 提交于 2020-01-17 10:21:37
问题 I tried to override Pdf classes for making changes toInvoice/Shipment/Creditmemo pdf but it doesnt seem to reflect. I created a module with following in the Mymodule/etc/config.xml <config> <modules> <Mymodule_Printtemplates> <version>0.1.0</version> </Mymodule_Printtemplates> </modules> <global> <models> <sales> <rewrite> <order_pdf_abstract>Mymodule_Printtemplates_Model_Order_Pdf_Abstract</order_pdf_abstract> <order_pdf_invoice>Mymodule_Printtemplates_Model_Order_Pdf_Invoice</order_pdf