Hi,
I wish to add a list of products to my site, and for this I am looking at the Products module. (There might be some alternative module, so feel free to suggest any alternatives if you know of any).
One thing I need to have is a date field, so that I can have a view which sorts the products by this field. (Imagine a view with the Latest Products). Does anyone know if its possible to add this in any way to the Products module?
Does the Products module support multiple images for a product?
Another thing I noticed is that the default fields associated with a product are Tax, SKU and Weight. Is there any way to remove these because they will just confuse the user in my case.
If one is selling large items (Houses, Cars, Boats etc.) they aren't really relevant. Maybe there is another module more adequate for these kinds of product catalogues?
Thanks.
Products module fields and other questions.
-
- Forum Members
- Posts: 130
- Joined: Fri Feb 25, 2011 3:58 pm
Re: Products module fields and other questions.
Certainly the Products Module will allow you to define custom fields, so you can add "Date" to each item.
Sorting by this is probably possible, but it seems the Products Module does some odd things with custom fields and attributes - I'm still trying to find a way to get it to display attributes in a logical order (on my site each product has a number of dates in a drop down box, and the order changes randomly!).
The module definitely does support multiple images for each product, this is very easy to include. Simply create field definitions called, let's say, jbx1Image1, jbx1Image2 etc etc, then in your product detail template add:
wherever you want the first image to appear, and
Wherever you want the second image to appear.
The "IF" part of it looks to see if there is an image to use, if there is, it displays it, if there isn't, it does nothing.
I don't know how to remove the "default" fields from the input options, but would be interested in this too. You can prevent things like SKU and such being displayed by simple not calling them in your templates, or if using the default templates, deleting the line where they are called.
Sorting by this is probably possible, but it seems the Products Module does some odd things with custom fields and attributes - I'm still trying to find a way to get it to display attributes in a logical order (on my site each product has a number of dates in a drop down box, and the order changes randomly!).
The module definitely does support multiple images for each product, this is very easy to include. Simply create field definitions called, let's say, jbx1Image1, jbx1Image2 etc etc, then in your product detail template add:
Code: Select all
{if $entry->fields.jbx1Image1->value}
<img src="{$entry->file_location}/{$entry->fields.jbx1Image1->value}" alt="Whoever" class="whatever" />
{/if}
Code: Select all
{if $entry->fields.jbx1Image2->value}
<img src="{$entry->file_location}/{$entry->fields.jbx1Image2->value}" alt="Whoever" class="whatever" />
{/if}
The "IF" part of it looks to see if there is an image to use, if there is, it displays it, if there isn't, it does nothing.
I don't know how to remove the "default" fields from the input options, but would be interested in this too. You can prevent things like SKU and such being displayed by simple not calling them in your templates, or if using the default templates, deleting the line where they are called.
Re: Products module fields and other questions.
Thanks a lot for your reply!
Regarding the date, what type did you choose for it? There doesn't seem to be a date in the list of fields available. (For example I would need something like Recently Sold which would be an additional custom field.)
Regarding the images my concern is that the client most probably wants an arbitrary list of images. Pity its not a 'many-to-one' relationship and the list of images isn't just an array we can loop through using Smarty.
SKU and Weight its also a pity we can't simply disable them from the preferences.
Regarding the date, what type did you choose for it? There doesn't seem to be a date in the list of fields available. (For example I would need something like Recently Sold which would be an additional custom field.)
Regarding the images my concern is that the client most probably wants an arbitrary list of images. Pity its not a 'many-to-one' relationship and the list of images isn't just an array we can loop through using Smarty.
SKU and Weight its also a pity we can't simply disable them from the preferences.

-
- Forum Members
- Posts: 130
- Joined: Fri Feb 25, 2011 3:58 pm
Re: Products module fields and other questions.
For the dates, we add them as attributes. This automatically generates them in a dropdown labeled as "Dates".
Someone on the forum posted a while back about integrating products with gallery - i.e. you could ask a Product to call a particular gallery, that may be more what you're looking for? It's on the forum somewhere...!
You can, in the preferences, set "SKU is required for all products and attributes" to "No", but you can't remove it.
Someone on the forum posted a while back about integrating products with gallery - i.e. you could ask a Product to call a particular gallery, that may be more what you're looking for? It's on the forum somewhere...!
You can, in the preferences, set "SKU is required for all products and attributes" to "No", but you can't remove it.