magento

MySQL error when editing product in Magento

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 10:37:08
问题 it's a v 1.4.1.1 Magento, upgraded from a v 1.3.2.4 When I try to edit a product an error message appears: exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '6028-0-2' for key 'PRIMARY'' And if I try to reindex prices I have the same message in exception.log I think the problem is in the catalog_product_website table, because if I delete the row, I can run the price indexing, but as I try to edit the product to assign

Magento - How do I run this custom product attribute script

时光怂恿深爱的人放手 提交于 2020-01-14 10:16:30
问题 I have a problem regarding magento attribute. I have created a custom product input text attribute that supposed to hold an Integer Data Type, however, magento stores it as a varchar. I tried to ask about it here in stackoverflow and they told me that there is no way to change product attribute type to integer from string. So my solution is to create a custom integer product attribute. I search it on google for several days and I found an article that gives a script that creates a custom

Import csv product does not show on frontend in magento [closed]

二次信任 提交于 2020-01-14 06:53:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a csv with two products when I import this csv from admin panel it shows import successful and this product is shown on under manage categories with position 1. This product is not visible on my shop. When I change position 1 to 0 and save it and refresh all it will be display on frontend. or when I go

Magento: textbox instead of multi select in layered navigation

本小妞迷上赌 提交于 2020-01-14 06:30:12
问题 Is there a possibility in Magento to have a multi-select attribute, for which I would use a textbox in layered navigation instead of showing all items from multi-select? I have an attribute where I will have hundreds of options and need to use it in layered navigation. When customer uses invalid value, an error should show up. Edit: After the help from FlorinelChis I have folowing code in filter.phtml: <ol> <?php foreach ($this->getItems() as $_item): ?> <?php $attributeModel = $this-

Magento loadByAttribute fails on question marks

半城伤御伤魂 提交于 2020-01-14 06:24:46
问题 Trying to load a product by it's name ("What are Tests?") fails even though the product exists. $product = Mage::getModel('catalog/product')->loadByAttribute('name', 'What are Tests?'); It works for any other name though. As Magento ultimately goes through PDO, would the "?" in the name be interpreted as a parameter and as I'm not passing any value for it, the ending query would actually be looking for "What are Tests" ... therefore not finding the product? If so, how would I escape it?

How to add menu in magento admin panel?

寵の児 提交于 2020-01-14 05:31:06
问题 I am looking for some advice or information on how to do the following. I want to add one more menu in magento admin panel. I am trying many ways but not working. How can i add extra one menu in admin panel. please advise... 回答1: If this is your custom module what you need to do is in etc/config.xml add the following: <adminhtml> <menu> <report> <children> <module name> <title>Title to show in the menu bar</title> <sort_order>0</sort_order> <action>Modules controller action</action> </module

Magento browse files button not working

会有一股神秘感。 提交于 2020-01-14 05:16:30
问题 Magento Upload Image Issue : When I click on "Browse Files" button to upload images for a product. It is not browsing files from my computer. 回答1: Try different browsers. I know sometimes I find, say, it won't work in Chrome but will in Firefox. It's all Flash related. 回答2: Magentos Flex uploader is based on Flash. If you cannot select files this usually means you don't have the Flash plugin activated in your browser. 回答3: Check that there are no javascript errors You can use chrome developer

Magento: Adding current currency code infront of prices

老子叫甜甜 提交于 2020-01-14 05:06:12
问题 I am wanting to show my prices in Magento with the current code in front of the price: AUD $5.50 I can't seem to find a setting for this and I'm having trouble trying to find some code or a plugin to do this. Any suggestions? 回答1: You can try free module Currency Manager There is available currency symbol replace for every currency. Change "$" to "AUD $". 回答2: In app/design/frontend/YourInterface/YourTheme/template/catalog/product/price.phtml, find proper place(you should have many try :)

Magento How to speed up the site

假装没事ソ 提交于 2020-01-14 04:55:29
问题 I am facing one problem while loading my magento site. when refreshing my site it will take a time to load site, so i just want to decreased the loading time of my magento site so will you please anybody have an idea how to increase the loading speed of site and make my site speedy. My site content lot's of images so i think it will take a time while loading the site. i already try to compress the images as per suggested in this link [ http://imwill.com/magento-image-compression-solution/#

fputcsv causing “Headers Already Sent” error

旧巷老猫 提交于 2020-01-14 04:54:28
问题 I am writing a PHP export script for my copy of magento. For some reason, the following code gives me a "Headers already sent" error: //Load magento and set to match frontend require_once '../../app/Mage.php'; umask(0); Mage::app(); Mage::app()->loadArea(Mage_Core_Model_App_Area::AREA_FRONTEND); //Send headers to browser to prep for csv file download header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=exportSKUs.csv'); //Load only product collection details that