Re: end user,That looks GREAT.

end user's picture
Offline
Joined: 01/11/2008
Juice: 1738
Re: end user,That looks GREAT.

Ok see if I can explain this. This will have to be for D7/UC3 but I'm pretty sure and will check with it can be done with D6/UC2 pretty much the same way. I remember doing it once on a D6/UC2 test site.Actually what I'm gonna do is leave the QuickTabs out as that part is pretty simple even if you never set up QT before and I'll just do this with a Views block inserted into a region for now.So for the basic setup up you need the following modulesReferences (this is the module I used but there are a few others out there.Views

  • Download http://drupal.org/project/references and install References and Node References modules
  • Go to admin/structure/types/manage/product/fields and add in a new field called Node Reference and call it say Related Products.
  • Choose Select List for the widget type (or what ever widget you'd prefer).
  • Where is says "Content types that can be referenced" select the UC content types. In a stock install it would be called Product. Save the field to be taken to the next page.
  • Scroll down to the bottom where is says Number of values  and choose "Unlimited" for Maximum number of values users can enter for this field.
  • That should be it for the References module setup.

Now to create a view.

  • At /admin/structure/views click Add new view.
  • Give it a name
  • Choose Show "content type" of type "Product"
  • Sorted by leave it as is.
  • Uncheck the page view and select block at the bottom
  • Display format choose fields.
  • Click continue and edit.
  • Click on the Advanced link to expand it.
  • Under Contextual filters click add Content: Nid and click Add and configure contextual filter.
  • Select Provide default value  and select Content ID from URL Click apply.
  • Now look for Relationship and click on Add
  • Select  Content: Related Products (field_related_products) Appears in: node:product. (if you named your field Related Products)
  • Select Require this relationship and click add.
  • Now go to Filter criteria and remove all the filters.
  • Go to Fields and for testing purposes click on Content: Title.
  • Look for Relationship and choose field_related_products. Click apply. It should now show (field_related_products) Content: Title

Thats basically it for the view. You can go into the Grid setting and choose one column to show all products one under another. If not you can select any view type you want.Go to any of your products and edit one.

  • Scroll down till you see Related Products field and select the products you want to reference. Click save.

Now were gonna go into the block section at admin/structure/block

  • Scroll all the way down and look for View: Related Products and select the region you want it to appear in like say a side bar. Click on save.

So go back to your product and in the region where you put the block you should see a new Related Products block showing the nodes you selected on the Edit Node page.After that you can style the block any way you want.So thats the basic setup to get you going. You can do this with any node type you want to releate to.Now for QuitckTabs.This is pretty straight forward.

  • Once you install the QT module.
  • Go to admin/structure/quicktabs
  • Add a QuickTab  instance called Related Products or what ever you want.
  • Give it a title
  • Style
  • Default Tab.
  • When you go down to the bottom under Tab type select block
  • Under Tab content select the Related Products block.
  • Click save.
  • Now go back to admin/structure/block and look for the QuickTabs block.
  • Then select the region where you want it to show. Basically same as the way we selected the first block.

Thats the basic setup. After that its all styling.