Articles tagged with: product
Magento »
Problem: I had added a new product attribute. Suppose the attribute code is ‘test’. I have been trying to fetch/select that newly added product attribute. Here is my Magento collection code:- I don’t see the attribute ‘test’ when I print the collection data.
Magento »
While upgrading Magento, I got this error when I go to product list page. It says: Invalid method Mage_Catalog_Block_Product_List_Toolbar::isLastPage(Array()) Solution:
Magento »
While upgrading Magento, I am getting this error when I go to product list page. Error: Warning: Invalid argument supplied for foreach() in …/template/catalog/product/list/toolbar.phtml Solution:
Magento »
Here is a quick code to get product information with SKU value. Get product information by sku
Magento »
Here is a quick code to get all attributes and their name and value associated with any particular product. First of all we have to load the product by it’s ID. And then get all it’s attributes. Here is the code:-
Magento »
Here is a quick code to get any product’s stock information like quantity (qty), minimum quantity (min_qty), stock availability (is_in_stock), minimum and maximum sale quantity (min_sale_qty and max_sale_qty), etc. First load the product. Product can be loaded in different ways. Here are the two different ways to load any product in Magento:-
Magento »
Here is a quick and useful code on getting actual price and special price of any product in Magento. The actual price is the real price assigned to the product and special price is the price after any discount is applied to the product. Loading Product
Magento »
Here is a quick tip to sort/order latest product by both created date and new from date. Created At date is automatically added when you add a new product. However, you have to set New from Date manually while adding or editing product. You may have product with same new from date. And, then you [...]
Magento »
Scenario: I have changed my product’s Visibility to ‘Nowhere‘. But still the product is visible in both catalog and search. I have refreshed cache but the problem is still there. Cause:
Magento »
Scenario: I have a fresh installation of Magento 1.4. I already have installed the sample data for Magento. Now, when I go to the category listing page, no products are displayed. It says “There are no products matching the selection.“.
Magento »
Here, I will show you the code to get the most viewed products in Magento. The function addViewsCount() filters the products with their views count. Here is the code:-
Magento »
Here, I will be showing how you can get product collection from product type i.e. simple, configurable, bundle, grouped, and virtual. Here is the code:-
Magento »
Suppose, you have the product data. You can get product from either of the following way:- $_product = $this->getProduct(); OR,
Magento, MySQL »
Suppose, you have a product collection and you want to filter it by category. Suppose, you want to filter it by more than one category. You can use addCategoryFilter if you have only one category. But, what if you want to filter by more than one category? Category ids are stored for product in a [...]
Magento »
Here, I will be showing you the code to get sub categories of a particular category and the number of products (product count) present in the sub categories. Like, I have a category named Furniture. The sub categories under Furniture are Living Room and Bedroom. Now, I want to show the sub categories under Funiture [...]