How to display special offers

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 лет назад
Hi all,

I'm very new to nopCommerce. I've been developing with .NET for about 6 years and during that time I've had a couple of projects where half way through I wish I had made a different decision on which CMS/Framework to use - nopCommerce on the other hand appears to be absolutely awesome - so a massive thank you to the creators!

I have a quick question on special offers/sale items.

I have explored the discounts module. This allows me to create discounts without discount codes and apply that discount to a particular product, or category. I also note that there is a field call "Old price" for each product.

What I want to achieve is a page that lists all of the products on special offer/sale. What I'm not sure is how to acheive this.

Do I use the "old price" for this and then query the product service to get all products that have an "old price" that is not equal to zero? Or is there a method for extracting all products that are part of a discount?

Any advice and/or code examples would be greatly appreciated.

Thanks in advance
Al
12 лет назад
Hello,
for quick report please connect to DB trough Management Studio 2008.
Run SQL code for 2.x nopCommerce:


  SELECT p.Name, pv.Name as 'Product Variant Name', d.*  FROM [dbo].[Discount] d
  INNER JOIN [dbo].[Discount_AppliedToProductVariants] da
  ON d.Id=da.[Discount_Id]
  INNER JOIN [dbo].[ProductVariant] pv
  ON da.[ProductVariant_Id]=pv.Id
  INNER JOIN [dbo].[Product] p
  ON pv.[ProductId]=p.Id
  WHERE d.Name Like '%Name of discount%'

Instead of "Name of discount", use yours discount name or get all discounts for Products:

  SELECT p.Name, pv.Name as 'Product Variant Name', d.*  FROM [dbo].[Discount] d
  INNER JOIN [dbo].[Discount_AppliedToProductVariants] da
  ON d.Id=da.[Discount_Id]
  INNER JOIN [dbo].[ProductVariant] pv
  ON da.[ProductVariant_Id]=pv.Id
  INNER JOIN [dbo].[Product] p
  ON pv.[ProductId]=p.Id


When you will done, simple copy rows to excel.
12 лет назад
This might be a bit simple - but I am redesigning our site using v2.10.

We have just added an extra category called SALE!

and then assign the product to both categories.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.