76

The image URL that you've given is impossible to have with a Magento store. I'm guessing you wanted it to be obfuscated, but in doing so have made it impossible to answer. I can't think of any reasons to de-construct the image path unless you are web-scraping another website, otherwise, you would have direct access to the product model and could fetch this ...


44

This error appears when you remove a template folder, which is still referenced in the database. The simplest way to fix it is, go to the database, and in table 'theme', find the theme name which does not exist in app/design/frontend/package. DELETE the reference to the missing theme from the table.


36

Step 1 Build an array with your new website ids. $websiteIds = array(5,6,7); Step 2 Now get all the product ids. $productIds= Mage::getResourceModel('catalog/product_collection')->getAllIds(); Step 3 Assign all the products to the new websites: Mage::getModel('catalog/product_website')->addProducts($websiteIds, $productIds); Step 4 Feel good ...


23

This is actually by design. Magento will show the minimum price, because the retail price should always be higher then the group prices (otherwise, why wouldn't the customer just not login then attempt to checkout). This is evident in the following function: /** * Apply group price for product * * @param Mage_Catalog_Model_Product $product * @...


22

Hi Magento provide an attribute by below code $product->setAttributeCode($newValue) $ProductObject->getResource()->saveAttribute($product, 'attribute_Code'); Example: $product=Mage::getModel('catalog/product')->load($id); $product->setSpecialFromDate('2010-10-28'); // below code use for time format $product->...


18

Write an SQL Query. Second best way (and the one I recommend): \Mage_Catalog_Model_Resource_Product_Action::updateAttributes Code example by u_maxx: $allProductIds = Mage::getModel('catalog/product')->getCollection()->getAllIds(); $attributeCode = 'some_eav_attribute'; $attributeValue = NULL; $attrData = array( $attributeCode => $attributeValue );...


15

Here is what seams to work for me for to remove an attribute from the configurable product. This is the scenario. All the configurable products were created wrong with the attribute brand as a configurable attribute for about 50 configurable products having about 200 simple associated products. All the simple products associated to a configurable attribute ...


14

A simple way to do this, without much programming, is to take advantage of magento's product attributes. It's very simple to do the following - add a product attribute called "spec_sheets" and allow that attribute to used on the front end. Then add that attribute to the appropriate product attribute sets. have your client FTP the pdf files to a directory ...


14

Thanks to http://blog.belvg.com/magento-request-flow.html it is already documented.


13

The official Magento 2 user guide contains a chapter Creating Products which explains the different product types and how to create them. What you need is a Configurable Product. The configurable product will have associated simple products, which you already created, but you can also create them together with the configurable product. Quoting the ...


12

In your backend, go to Catalog -> Categories -> Manage Categories. Select the category you want to add products to. Click "Category Products" Tab Reset the Filter, select your products, Save Category


12

Warning, using setSkipSaleableCheck(true) appears to have an additional effect of showing disabled products in the dropdown. The function which is affected by this setting is in Mage_Catalog_Block_Product_View_Type_Configurable: public function getAllowProducts() { if (!$this->hasAllowProducts()) { $products = array(); $...


11

This works fine in Magento CE 1.6 and newer: $event = Mage::getSingleton('index/indexer')->logEvent( $product, $product->getResource()->getType(), Mage_Index_Model_Event::TYPE_SAVE, false ); Mage::getSingleton('index/indexer') ->getProcessByCode('catalog_url') // Adjust the indexer process code as needed ->setMode(...


11

As described in the question this issue has been addressed here but the answer was not working fine for me. I'm adding here a complete working solution (method 2). this is the code that is working fine for me: $cat_products_split = explode('&', $data['category_products']); foreach ($cat_products_split as $row) { ...


11

I can confirm that the answer by Vu Anh works. Here's an explanation why this happens when products are saved, although the deleted theme is used nowhere: After saving a product, the image cache is regenerated for all themes. Each theme can have its own image size formats, defined in etc/view.xml and all of these will be generated. But instead of looking ...


10

Here's the code I used recently for creating a product. It's based on having an array of image urls ($imgArray) rather than a single image url. It adds the first image in the array as the thumb/base/small and the rest as additional images. It was based on MagePsycho's blog post here; http://www.blog.magepsycho.com/how-to-import-product-images-from-...


10

The following code should work for you $stock_item = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); if (!$stock_item->getId()) { $stock_item->setData('product_id', $product_id); $stock_item->setData('stock_id', 1); } $stock_item->setData('is_in_stock', 1); // is 0 or 1 $stock_item->setData('...


9

The "code" solution: Create your own module, and in the config.xml file of the module add these 2 events inside the <frontend> tag: <events> <controller_action_layout_render_before_catalog_product_view> <observers> <[namespace]_[module]> <class>[module]/...


8

Short answer - no. There is no method to return the base image based on the cache image url. However, if you remove the cache folder and the hash you should be able to intuit what the URL would be, e.g.: http://www.mysite.com/media/catalog/product/cache/1/image/109x298/9df78eab33525d08d6e5fb8d27136e95/u/t/uti001_2.jpg remove everything after product until ...


7

Magento confirmed this is not part of Magento (Enterprise or Community). The parent (configurable) Stock Availability Status remains untouched regardless of what happens to any of it's children (simple). Magento actually provided me with a patch (for EE v1.12.0.2) for Enterprise that checks all a parents children status before deciding to display it or not. ...


7

i know this is way too after the fact to be useful to you, but for future searchers... janw's basic answer is right, but a more magento-ey way to do it would be: $parentIds = Mage::getResourceSingleton('bundle/selection')->getParentIdsByChild($product->getId()); then you can load a product collection filtering on those ids.


7

We have been hit with this bug too. We re-index every day and gained 24,000 URLs in just a few days for around 1000 products. I believe I may have found a fix for it. I have put this fix live on our production site and will see how it goes. If others can test it would be useful. In case things go wrong, make a backup of core_url_rewrite table and data In ...


7

There is no way to do this from the Magento admin. If you are merely looking for a way to do this as a developer, the following query will get you a list of SKUs and product IDs: SELECT e.entity_id, e.sku FROM catalog_product_entity AS e LEFT JOIN catalog_category_product AS l ON l.product_id = e.entity_id WHERE l.category_id IS NULL If you want to pull ...


7

You can delete all the product using Direct Sql. Please take backup your database, and run the following sql queries. Reset all product tables. Beware, below script will delete ALL your product data so do it carefully. `SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; ...


7

I would actually try to do it via SQL because in Magento, relations are done with foreign keys and ON DELETE CASCADE, so that you don't end up with dead data. However, before such an action, always make a backup, and try on a test database first! DELETE catalog_product_entity FROM catalog_product_entity e INNER JOIN catalog_product_entity_int v ON v....


6

This seems to be a bug in 1.7. If you have multiple simple products with the same url key as the configurable product (e.g. all names are the same), than magento always creates a new url rewrite on every index process. Example: First index: myproducturl (config product) myproducturl-id (simple product with its id appended, so far so good) Second index: ...


6

This requires direct edit of the database, and the first law of Magento is do not directly edit the database. But if you're crazy enough to proceed, this was covered on StackOverflow a few months back: ucts. I've tested the below DB workaround hack on CE 1.6.2 and it seems to be working: Create attribute Drag it to appropriate attribute set Go to ...


6

This is just my opinion, so don't shoot if you don't like it. I would use configurable products if the only configurable attribute is 'color'. Pro Using configurable products you take advantage of what Magento offers. Each product has it's own SKU, you can set out of stock only a few combinations, you can even make (custom) reports of how many red shirts you ...


5

Just to clarify, I assume you are using the Import/Export module, NOT Dataflow. If you have been using Dataflow please try the same process with Import/Export module and see if your results improve. This is definitely standard functionality - please see my linked CSV export from a fresh install of Magento CE 1.7.0.2 with sample data installed. Do a search ...


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