Custom product type

3 posts / 0 new
Last post
maggotbrain
maggotbrain's picture
Custom product type

Hi and congratulations on a very nice theme!
I bought EBazar to use it for an eshop that sells ropes and nautical supplies. Nautical supplies are very well handled by the "product" product type. But for the ropes I had to create another product type that adds some attributes (by drop down list of a taxonomy term) as rope diameter and rope color. This product type is called "Ropes". So when I create a new Content of the Product type with variations based on Ropes I have the following problems:

1. On the home page and in the latest and featured products blocks, the product title doesn't appear. Instead I get the product variation title with the custom attributes (diameter and color). I tried change the 'bazar' view but I got a bit lost there :). Is it possible to get the commerce product title instead of the product variant title in the bazar view?
(you can see an example here http://www.zkordoni.gr/eshop/ the product Σχοινί Scotta - sorry it's in greek but you should get the idea)

2. The custom product variation attributes (color and diameter) push down the 'add to cart' button and places it under the product image. I try to make changes in css (I change 'form-control' selector display to inline-block but that disrupts the contact form appearance as well). Is there a way to make the display of my attributes 'inline-block' and not affect my contact form appearance?
(you can see it here http://www.zkordoni.gr/eshop/items/%CF%83%CF%87%CE%BF%CE%B9%CE%BD%CE%AF-...)

3. As I added the quantity option in the 'add to cart' functionality, it appears that the quantity box is a bit wide although that the width is set to auto (in forms css file in the bootstrap/less folder). How can I change the width to lets say ie '40px' ?

And one general question: Is there a way to add children to a menu selection in main menu and the Parent item (for example Store) still be clickable to point to its original shortcut (ie. for Store is /bazar)?

Sorry for the long read and the number of questions!! (probably some of them can be attributed to my drupal noob level)

Thanks for any help

support
support's picture
Hi aggotbrain:

Hi aggotbrain:

Thanks for your words! Great you like the theme.

No problem with the Greek, I have 0% knowledge of it but I totally understand what you mean.

Now, the solution of your issues:

1. On the home page and in the latest and featured products blocks, the product title doesn't appear. Instead I get the product variation title with the custom attributes (diameter and color). I tried change the 'bazar' view but I got a bit lost there :). Is it possible to get the commerce product title instead of the product variant title in the bazar view?
(you can see an example here http://www.zkordoni.gr/eshop/ the product S????? Scotta - sorry it's in greek but you should get the idea)

To show the General Product Name, not the Variation one:

1 - Go to http://YOUR_SITE/admin/structure/views/view/bazar/edit/block_1
2 - In the left column, add a new field: " Indexed Node: Title "
3 - UNSET the "Create Label" and SET the "Exclude from Display".
4 - Click the small triangle to the right of the ADD Button and then select REARRANGE
5 - Move the " Indexed Node: Title " to the Top of the list.
6 - Open the field "(Product Variant) Commerce Product: Title "
7 - Expand the "Rewrite results" TAB and SET there " Rewrite the output of this field "
8 - Right on the TextArea labeled as "Text" paste this "[title_1]" (w/out the quotes)
9 - Apply and Save the view on the right top corner.

2. The custom product variation attributes (color and diameter) push down the 'add to cart' button and places it under the product image. I try to make changes in css (I change 'form-control' selector display to inline-block but that disrupts the contact form appearance as well). Is there a way to make the display of my attributes 'inline-block' and not affect my contact form appearance?
(you can see it here http://www.zkordoni.gr/eshop/items/%CF%83%CF%87%CE%BF%CE%B9%CE%BD%CE%AF-...)

Well, here you will have to play a little bit with Firefox-Firebug or Google Chrome Element Inspector. All code needs to be placed on the file sites/all/themes/ebazar/css/style.css as is the file created for it.

I picked up your new HTML component´s ID´s so you can go directly:

.form-item-attributes-field-rope-color{} /* the Rope Color */
.form-item-attributes-field-rope-diam{} /* the Rope Diameter */
.attribute-widgets{} /* the DIV containing the 2 previous fields */
#edit-quantity{} /* the Ammount to add to Cart */

When you arrive to the responsive breakdowns, get the media quieries from the sites/all/themes/ebazar/less/style.less file.

3. As I added the quantity option in the 'add to cart' functionality, it appears that the quantity box is a bit wide although that the width is set to auto (in forms css file in the bootstrap/less folder). How can I change the width to lets say ie '40px' ?

Use the selectors I posted on the previous answer.

And one general question: Is there a way to add children to a menu selection in main menu and the Parent item (for example Store) still be clickable to point to its original shortcut (ie. for Store is /bazar)?

I would also love to do so, but Bootstrap developers say "there is no more need of dropdown submenus in a mobile world" and plus this, they have removed the interactivity of the first element of the menu(replaced in fact, with the dropdown toggle). There are some fixes but we prefeer to attach to the framework developers for future updates.

Anyway, one workaround is to add the first element of the menu to be that Store Link something like "All Products".

Wow.....! What a set of questions! :)

Best!!!

maggotbrain
maggotbrain's picture
Wow.....! What a set of

Wow.....! What a set of answers! :)

Thanks a lot for your clear, precise answers! I guess it is as it's advertised: you buy more than a zip file: you get our themes + our support. :)

Log in to post comments