Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged magento



works in produktdetail magento 1.4.2 & 1.5.0.1
0 1574 posted 15 years ago by nico65
0 2466 posted 15 years ago by nico65
not fully tested maybe must be like specialprice in this excample
0 1315 posted 15 years ago by nico65
List all orders related to a product id
0 1206 posted 15 years ago by neofreko
Say you don’t want to reset ALL your orders, maybe you want to PRUNE a production database. if that’s the case, this php file (added to a crontab, or ran from your magento root directory) will DELETE all cancelled orders (5000 limit per instance)...
0 1484 posted 15 years ago by hotdiggity
2 1334 posted 15 years ago by alexmargineanu
template catalog->layer->view.phtml
0 1511 posted 15 years ago by nico65
Save the file to the directory where Magento resides.
0 1374 posted 15 years ago by TheJasonParker
And a now, word on the log.php maintenance script that comes with Magento 1.4 which has one major shortcoming. It doesn’t maintain your dataflow_batch_* tables, said tables have been seen hiding in the wild at over a Gigabyte in size. php -f...
0 1412 posted 15 years ago by TheJasonParker
This fixes the way Magento imports data as it just keeps adding ‘straight join’ to the array which uses a lot of memory if your importing a lot of products and will kill the import. Replace this function in /lib/Varien/Db/Select.php This h...
0 1313 posted 15 years ago by TheJasonParker
Change the category id and store id at the top of the script before running it. You can also remove the echo statements if you don’t want any output.
0 1347 posted 15 years ago by TheJasonParker
login issue in development server (copy site from live site) site url is different
0 1508 posted 15 years ago by aashvi
First off, create your CSV with 2 columns, the parent ID for the category and the category name – you could easily add more columns for extra options, but it wasn’t necessary for us. The CSV file should be something like this: 3,subcat 4,s...
0 1281 posted 15 years ago by TheJasonParker
Simply save the above code in a PHP file in the base Magento directory of your store, and visit the URL in your web browser, simples!
0 1302 posted 15 years ago by TheJasonParker
Create a CSV with a maximum of 1 column, with just the Magento category ID.
0 1210 posted 15 years ago by TheJasonParker
The easiest way to pull this off is by means of a quick script. The key to this script is that the indexing functionality is disabled entirely for the process, then enabled again at the end – requiring a manual update at the end. In our case, we...
0 1548 posted 15 years ago by TheJasonParker
Overlook sending of emails in Mage_Sales_Model_Order->sendNewOrderEmail(), remove sending to customer from there. (around line 872)
0 1379 posted 15 years ago by nico65
I’ve implemented something similar a couple of months ago. What we wanted was to prevent the cart from the old session from merging into the cart of the current session at the point when the customer login. If that describes what you want as well,...
0 1281 posted 15 years ago by TioSolid
0 1311 posted 15 years ago by dmistriotis
Use Mage::register() to add an entry into registry, Mage::registry() to retrieve data and Mage::unregister() to delete registry entry.
0 1165 posted 15 years ago by vrnet
nice post, would do it a bit differently but using it currently as-is.
0 1524 posted 15 years ago by dmistriotis
The "design/header/logo_src" matches the path column in the core_config_data table in the database. You can use the path value to load the value of any config row.
0 1434 posted 15 years ago by TioSolid
0 1273 posted 15 years ago by dmistriotis
Following sql statement collect product sku with store url select catalog_product_entity.sku,catalog_product_entity_varchar.value from catalog_product_entity,catalog_product_entity_varchar where catalog_product_entity_varchar.attribute_id=87 an...
0 2653 posted 15 years ago by aashvi
How to retrieve product attributes outisde the product page in Magento
0 1227 posted 15 years ago by TioSolid
Return a list of all store Categories
0 1647 posted 15 years ago by TioSolid
run mysql query direct on your magento script
0 1403 posted 15 years ago by aashvi