Customer product limit in NOP Commerce - nopcommerce

How can create number limit for products for each customer in NOP Commerce? For example, buyable number of product P for customer c be 10.

You can use Maximum cart qty property in the Inventory section on the product detail page. It will restrict the customer and would not allow them to add more than the quantity defined at Maximum cart qty in the cart for each checkout.

I added some code to Nopcommerce source code that get product, user and user's limit for shopping product.

Related

How to get each product at the cart page of Drupal Commerce

When I override the cart page in the template views-view-table.html.twig, the array row.columns for each row of the table i.e. for each product contains only the following keys:
purchased_entity
unit_price__number
edit_quantity
remove_button
total_price__number
At that the first field purchased_entity is again the unit price instead of any product data e.g. ID or title. So the list at the cart page doesn't have any identifying information about the products a buyer added to the cart - only their prices.
When I look under the variable product_variation inside the template commerce-product-variation.html.twig when it's loaded by the cart page, it has only two available keys, again only prices: list_price and price.
How to get product ID under the variable row.columns or purchased_entity at the cart page?

WooCommerce - Checking if my first variable subscription item is sold

I have two Questions:
Question 1:
I am using a "Woocommerce product bundle" and "Woocommerce subscriptions" plugins and want to restrict my FIRST variable subscription item to restrict to sold to only one customer? In other words no other customer can buy it if one customer is already subscribe to it.
Question 2:
Also How do I check in the custom loop if the customer is subscribe so I can exclude that product from my archive product page?
Thanks!

Apply coupon per product

I want to apply coupon per product basis, not on whole complete cart. So that my coupon could subtract that specific amount form all item one by one.
Pretty straight forward if your woocommerce is up to date. When you go to Dashboard > Woocommerce > coupons and add new. You can select from several options including Cat Discount, Cart % Discount, Product Discount, Product % discount. You just select either product or product % and you're good to go. Only that product will be discounted leaving the rest of the cart at full price.

woocommerce shipping table rates per order + per cart

I am using woocommerce table rate shipping
In my current system I need to two types of shipping rates
1. Per Order (Based on category )
2. Per Item (Based on category )
The both categories are working fine if the products are separately added
But while I am adding and one products from each categories, in that senarioes I want to both shipping method summation.
Can anyone help me?
Thanks,
Denis
http://www.yiion.com
If you are using the Table Rate plugin from WooCommerce you have to check 'break' when setting up the shipping method.

WooCommerce: exclude sale price based on user role

I'm using WooCommerce and the Dynamic Pricing extension. I've set pricing discounts for 2 user roles (Dealers and Distributors) with the extension. Currently, if I set a sale price on a product, the sale price is reflected for all user roles, and the extension discount for Dealers and Distributors is then compounded on top of it.
How would I conditionally state that if the user is a Dealer or Distributor, remove the sale price but still apply the price discount that's set in Dynamic Pricing?

Resources