Update product stock directly from Magento database

Magento
Sometime in some situation development time we need to update products quantity and stock status directly in the magento database. here I describe the most efficient way to do this is to update the products quantity and stock status directly in the database. Product quantity is stored in cataloginventory_stock_item table in qty and stock status in is_in_stock column, also we have to update cataloginventory_stock_status, the columns qty and stock_status with the corresponding Boolean value. So, the SQL query should look something like below query: [sourcecode language="plain"] UPDATE cataloginventory_stock_item item_stock, cataloginventory_stock_status status_stock SET item_stock.qty = '$new_quantity', item_stock.is_in_stock = IF('$new_quantity'>0, 1,0), status_stock.qty = '$new_quantity', status_stock.stock_status = IF('$new_quantity'>0, 1,0) WHERE item_stock.product_id = '$product_id' AND item_stock.product_id = status_stock.product_id [/sourcecode] where $new_quantity contains the product quantity sent by our ERP system and $product_id is the…
Read More

Magento OnPage SEO for Optimisation

Magento
Magento is exceptionally exceptional ecommerce stage and numerous shopper utilize magento for online shop. There are numerous profits to utilizing Magento for your shopping truck. At the same time there are additionally a few disadvantages to Magento's open source shopping truck platform.one of the aforementioned essential disadvantages is with Seo. Magento isn't the most Seo-accommodating open source programming. In the event that you are needing to do on-page Seo for your site, it could be a touch demanding with Magento. Magento Page Content An additional Magento Seo tip is to determine your Magento class pages and content pages are optimized and could be applicable pursuit terms. Every page title and portrayal ought to be remarkable to diminish copied substance on your site. Content Pages Essentially head off to Cms >…
Read More

5 Steps that’ll rocket your magento store conversion rate

Magento
What’s the most important part of online retail business? Leads, you would say. Of course leads are important, but what’s the point of having leads which don’t convert. Conversion rate of an e-commerce site speaks about its success. The higher the conversion rate, the more is the number of purchases and the better is the reputation of the store among-st buyers. Are you wondering about the conversion rate of your Magento store and devising ways to improve it? Well, stop thinking and start reading. To convert leads into sales, there are few fundamentals which you must keep in mind and opt for the right Custom Magento development partner. Enlisted below are 5 such fundamentals. Read through and understand how you can optimize the conversion of your site. KISS (Keep it…
Read More

Increase Image Quality on Magento

Magento
Magento accordingly layers the picture throughout the transfer process to have thumbnail pictures and essential pictures show faster for your clients. Magento expects that you favor speed over picture quality and lessens the span of your picture. The point when picture quality is not strictly outlined for certain sorts of pictures, Magento framework takes the first ever worth, and for some it figures its own particular. All we need to do is to situated the picture quality to the most astounding quality. This could be finished assuming that you open a record: app/code/core/mage/catalog/helper/image.php Discover a strategy __tostring() and simply before attempt condition before all else of the system, embed the accompanying scrap of code: $this->_getmodel()->setquality(99); provided that you need to enhance the nature of item pictures in category see steer…
Read More

Magento Development Services

Magento
Justwebdevelopment provide all types of magento realted services. If you find affordable magento development service your search end here. Magento Development Magento is an open source web application especially made for ecommerce purpose. It works on Zend framework. After the launching of magneto in 2008, it has been popular day by day as the best ecommerce platform. Magento is PHP based and buffering its data in MySQL.In order to offer the best solution in eCommerce development, magento development proves to be the best platform. Magento provides such a flexibility which helps in business growth. Inquire Now Read More Magento Theme Development It is true that having a stunning website design can leave a good image in the mind of visitor. In the eCommerce market prior to initiate an online shop…
Read More

There was a problem with reindexing process magento

Magento
When I try to reindex from magento admin I show error "There was a problem with reindexing process". I found many post in google but not get excat fixed. After many hours I fixed that issue and I show you how you can also fix this issue and working good all reindex.   1) Export all catalog_product_flat _1 tables with data and structure with 'Disable foreign key checks' enabled. 2) Truncate all catalog_product_flat _1 tables. 3) Ensure that whether products categories are all visible in Frontend. 4) Login to Magento Admin Panel. 5) Then go to 'System' menu and click on 'Index Management' submenu. 6) At last click "Reindex Data" next to "Product Flat Data" index. To figure out the reindexing issue for Category Products do the following actions: 1)…
Read More

Removed shipping address and shipping method from onepage checkout in magento

Magento
Here I can show you how to remove shipping address from onepage checkout and remove shipping method from onepage checkout in magento. Based on different shop and requirement we need to magento customize onepage checkout method. When site give user only product information or accept only quote request based on product then no need to show shipping address and shipping method tab from onepage checkout in magento. If you are managing logistics for heavy equipment, consider using specialized services for tasks like https://www.shiply.com/de/fahrzeugtransport/traktortransport.php to ensure safe and efficient handling. If you want to removed shipping address and shipping method from onepage checkout in magento then foloe below step. Step 1: GO to /public_html/app/code/core/Mage/Checkout/Block/Onepage/abstract.php Replace this code [php] <?php protected function _getStepCodes() { return array('login', 'billing', 'shipping', 'shipping_method', 'payment', 'review'); } ?>…
Read More

Cannot initialize the indexer process

Magento
When I upgrade magento all is work fine but when I try to reindex then it show me error like "Cannot initialize the indexer process". I spend lot time and finally I got the solution for this. I found many solution for fixed this issue but not work for me but when I repair my magento database using database repair tool developed by Magento core then its fixed me. How to repair the magento database: 1. Download repair tool from Magento and unzip the package. 2. Upload magento-db-repair-tool-1.1.php to your server 3. Backup your current database (call it 'magentoDB1'). Export this database and then import it into a new database (let's call it 'magentoDB2'). 4. Install a fresh Magento using 'magentoDB2'. 5. Now open the the URL in browser: http://www.youdomain.com/magento-db-repair-tool-1.0.php.…
Read More

Magento addAttributeToFilter SQL Conditionals

Magento
If you want to customize query or product collection data you can easily to do that with addAttributeToFilter funcation in magento. In short you can easily customize product collection select query based on your requirement in magento development. [php] <?php $collection = Mage::getModel('catalog/product')->getCollection(); ?> [/php] If you want get all fields then use below condition select [php] <?php $collection->addAttributeToSelect('*'); ?> [/php] If you want to get limited fields then use below condition [php] <?php $collection->addAttributeToSelect(array('name', 'product_url', 'small_image')); ?> [/php] [php] <?php $collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect(array('name', 'product_url', 'small_image')) ->addAttributeToFilter('sku', array('like' => 'test-product%')) ->load(); ?> [/php] The above code would get a product collection which contain only products that have an SKU starting with "test-product". addAttributeToFilter Conditionals [php] <?php // Is Equal To (eq) $collection->addAttributeToFilter('status', array('eq' => 1)); // Is Not Equal…
Read More

Magento get items in order

Magento
Here, I can show you how you can get information about all items in your magento shopping cart based on order id. How to get product details from order id or sometimes need to get product it, product sku, product name , category id, category name. So its easy to get product from order item based on order number. [php] <?php require 'app/Mage.php'; Mage::app(); $orderNumber = 100004544; $order = Mage::getModel('sales/order')->loadByIncrementId($orderNumber); // get order total value $orderValue = number_format ($order->getGrandTotal(), 2, '.' , $thousands_sep = ''); // get order item collection $orderItems = $order->getItemsCollection(); foreach ($orderItems as $item){ $product_id = $item->product_id; $product_sku = $item->sku; $product_name = $item->getName(); $_product = Mage::getModel('catalog/product')->load($product_id); $cats = $_product->getCategoryIds(); $category_id = $cats[0]; // just grab the first id $category = Mage::getModel('catalog/category')->load($category_id); $category_name = $category->getName(); echo "orderNumber=".$orderNumber."<br/>"; echo…
Read More