If product in category then....

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hey guys just wondering how i'd check on the product detail page something like:

if product is in a category called rings then display a link to a pdf that had a size chart..

i.e.

RingChartPlaceHolder.Visible = Product.IsInCategory("rings");
12 years ago
Hi,

I have a similar issue in that I wish to execute some rules behind the scenes based on what category a product is in.

I'm using nop 2.1 as I require fully working SagePay Integration.

It seems that nop can support a product being in more than one category at once, however looking at the structure of the tables on the database, OrderProductVariant table has a pointer to the Product for that order line, which when mapped to the Product_Category_Mapping table does get you to a CategoryId to be able to select the Category used.

The problem is, if that product appears in two different categories at the same time (it is possible in my version of the application to make the categories more meaningful for the user to select) then how do you tell what category the product was in when the order happened?

Looks like there needs to be a CategoryId field on the OrderProductVariant table to me to facilitate such a situation.

Anybody else come across this or have any thoughts?

:)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.