Product price defined by customer role in nop 2.2

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
Hi to all.

I have upgrade my web site from nop 1.9 to nop 2.2.
Now I'm not more able to have the products price linked to the customer role.
In nop 1.9 was easy using produts variant-> tier prices
Is ti possible in nop2.2?

Thanks,
Giorgio
Hace 12 años
ledpoint wrote:
Hi to all.

I have upgrade my web site from nop 1.9 to nop 2.2.
Now I'm not more able to have the products price linked to the customer role.
In nop 1.9 was easy using produts variant-> tier prices
Is ti possible in nop2.2?

Thanks,
Giorgio

In 1.9 when creating/editing product variants you had two differnent tabs: Tiered Prices and Prices by Customer Role.
In 2.x you can handle BOTH in Tier Prices which can be assigned to all/specific customer role. So you can now define a single price or better tier prices for customer roles :)
Hace 12 años
I have define tier price for customer role but it does not work.
I have a product with 3 customer role prices, quantity 0 (the fild is mandatory) and price. The global price is 0.
In the store I always see 0 price indipendently of the customer.
Also I try to modify the tier price configuration enabling it and disabling it. The result it's always the same.

Any idea?

Regards,
Giorgio
Hace 12 años
ledpoint wrote:
I have a product with 3 customer role prices, quantity 0 (the fild is mandatory) and price.

Try to set quantity to 1. It'll work fine
Hace 12 años
It does not work.
Also I'm not able to see this "decison" inside the C# code.
I try locally to update the GetFinalPrice function in priceCalculationService.cs with this if case:

            //tier prices off -> check for customer price list
            if (_catalogSettings.IgnoreTierPrices && productVariant.TierPrices.Count > 0)
            {
              decimal tierPrice =0;
              
              foreach (var tierPrice_ in productVariant.TierPrices)
              {
                foreach (var customerRol in customer.CustomerRoles)
                {
                  if (customerRol.Id == (tierPrice_.CustomerRoleId.HasValue ? tierPrice_.CustomerRoleId : 0))
                    if (tierPrice>tierPrice_.Price) // Apply the lower price list
                    tierPrice = tierPrice_.Price;
                }
              }
              initialPrice = Math.Min(initialPrice, tierPrice);
            }

And apparently work fine.
Do I need to upload all the bin directory or Nop.Services.dll is ok?

Regards,
Giorgio
Hace 12 años
I try this code locally:
            if (_catalogSettings.IgnoreTierPrices && productVariant.TierPrices.Count > 0)
            {
              decimal tierPrice = -1;
              
              foreach (var tierPrice_ in productVariant.TierPrices)
              {
                foreach (var customerRol in customer.CustomerRoles)
                {
                  if (customerRol.Id == (tierPrice_.CustomerRoleId.HasValue ? tierPrice_.CustomerRoleId : 0))
//                    if ((tierPrice==-1) || ((tierPrice>tierPrice_.Price)&&(tierPrice_.Price!=0))) // Apply the lower price list
                      tierPrice = tierPrice_.Price;
                }
              }
              initialPrice = Math.Min(initialPrice, tierPrice);
            }

and it work.
The same code on my remote server does not work.
I try to restore original code locally and I it work!!!!
Probably something is wrong on the remote configuration. Maybe the productVariant.TierPrices structure is empty or the customer.CustomerRoles structure is empty.
Any idea?
Hace 12 años
I have find the solution.
I don't know why but if the product price is 0 or less of the customer price list, then it does not work.
In order to get it working I need to insert 9999 in product price.

Do you know any other solutiom?

Regards,
Giorgio
Hace 12 años
nopCommerce finds and uses the smallest price. In your case it's 0 (default product variant price). So just set the price to any number that is larger than the configured tier prices.
Hace 12 años
hi,


i need full clearification for how i can set wholsell rate & retails rate of same product.


Thanks in advance





Abdhesh
Hace 11 años
thanks all
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.