Show Product on Base of Selected product Category - odoo-12

how to list products in sale order respective to selected product categories
I want to add product category option in sale order line odoo 12 on the base of product category only those products will be shown in product list which lies b/w selected product category. please help me with this.

Related

Is there a better way to design an E-commerce products database when the products can have multiple price lines?

I'm trying to develop a new products database for a client and I am having a hard time finding a solution to handle the many different prices a product can have.
Variables that can affect the price of a product:
region (where the customer lives).
customer type (whether they're a new customer or a registered customer).
order type (whether you want to purchase the item once or subscribe monthly).
store type (there were many store types, but now they're transitioning to one, but I don't know if they will add more in the future again so I want this to be flexible
Product Table
id
product_name
sku
description
1
Vanilla Protein Powder
1111
This is a description...
Attributes Table
id
associate_type
region
store
currency_code
order_type
1
2
1
11
usd
1
2
2
1
11
usd
2
Product Attributes Table
id
price
product_id
attribute_id
1
49.95
1
1
2
29.95
1
2
I was initially thinking this would be a good route to go, but the issue that arises is on the product page I want to display the price of the product if you want to purchase it once and the price if you wanted to subscribe. The same issue would happen if I also wanted to show a list of product cards on a product category page displaying both prices.
The issue I run into
When I write a query to get the correct products with the correct price lines, I would filter all the products by the variables mentioned above, but I will always want the subscription price and the one-time price, so in the query, I would have to include WHERE order_type = 1 AND order_type = 2 but doing this would return duplicate records of the product/ products because of the different prices for a one-time purchase and a subscription purchase.
Is there a better way to set up the tables I have so that the query would not return duplicate records of the product/ products? Or is there a way to write the query to handle this for me? Or do I even need to switch up my database design altogether?

All Products showing in one row when i use short code wordPress

Ecommerce product catalog not showing product in a row.
I am putting short code to show products.
when i put my short to show products its show products list in one row.
i want to show products in 3 row.
my short code is
<h4>Southern Pepper Curry​</h4>
[show_products per_column="2" per_row="2" category="89" archive_template="morden" ]
i am using per_row="2" means i want to show products two in each row also how can i give pagination.
i have also change in Ecommerce product catalog plugin setting with 2 product per row but effect on my site.

How to add 2 buttons 'add to cart' getting with different data in Prestashop?

My product has 2 prices (discount price, old price). I want to add two buttons that add product with different price. How I can do it?
If you need to just show old/discounted price for a product use Specific Prices option in Prices tab of a prodct.
Or maybe you want to do that for a bunch of products.
The standard way to do that kind of things in Prestashop is by using price rules. In this case you may need to create a category like Sales/Offers. Assign all products you need to that category in their Association tab. Then go to Price Rules -> Catalog Price Rules + Add a new condition group (choose category here), create the price rule above based on your needs.

Descrese quantity when order is placed

I want to decrement quantity 10 of particular product each time place an order by customer in magento. its don't matter what quantity added in product detail page by customer.
Please help
Maybe using observer like sales_quote_add_item, will allow you to set custom quantity once the product is added to the cart.

Apply Discount to Products in Magento Cart page

I wanted to know how can I give discount value/percentage on cart page for specific product's quantity dynamically via OBSERVER.
Discount can be given on same product's with different quantities.
EX:
Customer add 4 QTY from Product A and I should be able to give 10% discount on 2 QTYs and the discount value should be shown after subtotal (as normal cart rule applied in Magento)
If I can create dynamic cart rule and apply that to products which I wanted that also useful in this case.
http://excellencemagentoblog.com/magento-add-fee-discount-order-total
this is good link to give discount for order , we can modified for particular product & product qty. calculate discount for different product and its qty. add it and setFeeAmount.