0

I am using Ubercart shopping cart for my site in Drupal. The website is restaurant website. For the Menu items, I have created 2 main categories as follows :

  • Lunch
  • Dinner

Now the main categories contains subcategories as follows :

  • Ensalades
  • Entremeses
  • Platos Principales and so on.

Now Most of the subcategories are common to both main categories e.g Ensalades and Entremeses are present in both Lunch and Dinner category.

I have created a view for my product categories page to display all categories products. Below is the attached screenshot of my views what I have done so far. enter image description here

Its working fine until I add a item in both the catgories i.e Lunch and Dinner.

Suppose if I add item names Luis Salad in Lunch - Ensalades and Dinner - Ensalades category.

When I view the Dinner page it shows Luis Salad item twice in that page. First for Dinner category and second time for Lunch category as the items has been added to the both categories.

I just want to know is anything wrong in my view or I have created categories wrongly.

One way which will help this problem is to create a new item for each category. But that is not the right way as we cannot have one product to be treated as different product for different categories. Below I also attached my screenshot for my categories. enter image description here

Thanks in advance.

4

1 回答 1

0

我认为更好的方法是创建两个词汇表:一个用于主要类别,第二个用于食品类型。

  • 主要词汇

    • 晚餐
    • 午餐
    • ...
  • 食物种类

    • 甜点
    • 项目清单
    • ...

因此,在视图中,您只需按两个分类术语进行排序。为每个主要类别创建两个显示页面的最简单方法。

于 2011-11-16T09:15:37.650 回答