Magento hide out of stock products - magento-1.7

I have System->Configuration->Catalog->Inventory->Display Out of Stock Products option set to No.
But this out-of-stock products still exist in category list. Is this config option works with product collection? How can i hide out-of-stock products from category product collections?

To make this work you should go to System->Configuration->Catalog->Catalog and set Use Flat Catalog Product to Yes. After that just launch Product Flat Index

Related

Magento2.3 how to create Cart price rule only specific category with same assigned product

Magento2.3: I have four categories category1, category2, category3, and category4 and I have one product (Product-A). I assigned Product-A to all categories (Cat...1 to cat...4). Now I plan to create a "Cart Price Rule" for Category4 with a 5% discount.
So how to create a Cart price rule only for Category4. If I go to Product-A through Category1 or 2 or 3, that 5% coupon code should not apply. It's only applicable for Product-A through Category4. Any suggestion, please...
In the Conditions section when creating the rule you choose the category according to your needs. When a category is selected, it will apply to the products in that category
https://docs.magento.com/user-guide/images/images/price-rule-cart-subselection-category.png
I believe this is not possible as per default magento. As it only checks whether the products are assigned to a category or not.
So in your case all categories will be matched and the rule will be applied!

E-Commerce REST API for categories

In my e-commerce project, I am building a set of REST APIs to list the categories and products from the catalog management system. A category can have sub-categories and a product can belong to a category or stand by itself.
- root_category
- sub_category
- product1
- product2
- product3
Here in this example, root_category contains sub_category & product2. The subcategory contains product1. product3 doesn't belong to any category.
Here are the possible use cases:
List all the products in the system.
/products
Get product details by id.
/products/{id}
Search for products by id, name or description (need to query by one of these criteria)
/products?searchTem={searchTerm}&q=[byId|byName|byDescription]
List all categories in the system.
/categories
5(a). List sub categories belonging to a particular category.
/categories/{id}/categories
5(b). List root level categories. (eg. root_category).
/categories/#root/categories
6(a). List products belonging to a category.
/categories/{id}/products
6(b). List products that don't belong to any category. ie., root level products (eg. product3).
/categories/#root/products
Please let me know your comments and suggest improvements for these REST URIs listed above. I am a little concerned about 5(b) and 6(b).Can those URIs be designed in a better way.
I think that looks reasonable, the only issue I have is the use of category id.
I would prefer to see a category name used, which is more user-friendly.
Category name has to be unique obviously.

What's the deference between product catalog and category in Ofbiz?

What's the deference between product catalog and category in Ofbiz ?
I think all of them is a group or set of product that have one or more common characteristics. But in Ofbiz's using one Catalog have many Category ?
Thanks!
They are similar, but catalog contains a list of categories with different purposes: home page categories, search categories, etc.
http://ofbiz.135035.n4.nabble.com/Product-Category-and-Catalog-td4636208.html

how to to filter data category wise in filemaker pro 12?

I am working on filemaker pro 12. I made 3 tables category, product and product_catalog. category table having two fields-
(1)cat_id
(2) category
product table having fields-
1- pr_id
2- category(dropdown list)
3- pr_name
4- price
product catalog having fields-
1- category(dropdown list)
2- product(dropdown list)
3- price
I fill the dropdown fields using value lists . I want on product catalog , when anybody choose any category then next dropdown show only that category products..
I also related the tables from cat_id to category Of product_category of product. product code to product of product table. Have any body solution..???
Thanks in advance...............
In your value list definition, try the "only show related records" option.

Mongo Schema Design

I'm pretty new to Mongo. Just started a project using Mongodb as the database.
I'm not sure how should i design the following use-case to a document base database.
User-Case
1. Vendor/Distributor has a list of product on our system.
2. There's a standard price list of each product for any customers.
3. Vendor/Distributor also has customize price list of each of the product for each customer.
eg. CustA have a productA at different pricing from the standard and it's only available to him.
4. Some of the Product are only available through customize price, and I match those product with attribute public = false.
How should i work this out in document base database?
Current design i have is.
1. [Product Document] with embedded document of standard price list.
2. [Product_Price Document] with oneToMany link [Product Document] and oneToMany to [Customer Document]
3. [Customer Document].
With this Model, I'm facing problem with querying by paging.
Example I query the first 30 Product sorted by name. Then query [Product_Price Document] with the 30 ProductId that match, so that I have those customize price for that customer who login.
The problems come where by I couldn't query item that are customize to the user that is not available for everyone.
Is there a better way or design the schema or what should i do with the query?
I'm using PHP, Doctrine2, Symfony2
When you query the Product_Price_Document query it using both ProductID and current CustomerID. Or am I missing something?
Here's how I would structure it.
Have two collections:
- Products
- Vendors
Your products table would have the list of all your products and their standard price. Your vendors page would have an array of product ID's along with an override price in the case that they have a different price for that particular product.
If you are also tracking customers then you could make that a collection too and have a belongs to relationship almost to the vendors.
so in short:
collection.vendor:
{"name":'foo',"products":[{"_id":mongoId,"priceOveride":15.50},..]}
collection.products:
{"name":"bar","price":15.40}
Excellent resource for reading a bit more into the relationships which you can use:
Learn Mongo Interactively