Filtering my products on drupal commerce - drupal

I have imported 5.000 to my drupal-commerce website.I want the user to be able to navigate fast on all of these products,so I just figured out that I need to make somehow a filter or a search that when the user chooses/selects some of the features of the product the result will be only the products with these features.How can I manage to do this on Drupal 7 and Drupal Commerce(Commerce kickstart?)

The short answer is that you'll probably want to use the Views module. You can create a Views page display for your main products page that loads the Commerce product displays. Since the product displays don't actually contain the field values that you'd want to filter (they're on the referenced products), you'll need to add a Relationship to the products. That'll let you add filter criteria for product fields (exposing them will make them visible to the user). If you want the exposed filters to appear in a sidebar, use the "Exposed form in block" option on the Views display to create a filter block that you can add to your sidebar region on Administration » Structure » Blocks (/admin/structure/block).
Most people who have used Views over the years are used to outputting the Views result using Fields and then customizing the display of the fields with template files or extensive configuration, etc. However, you can create a custom view mode for your product display content types and give them layout with Display Suite. You can output those custom displays in Views using the Content Format.

Related

What's the best the approach to add an extra attribute field in Drupal Commerce?

I'm using Drupal Commerce and i have a product type called "Painting" this product type does not have an attribute fields, I'm using inline_entity_form module so i can show the product add form within the node add form for my product display content type.
The product in the site is the painting itself, it may come with a frame or without a frame (the user can choose) and the price will change based on the user's choice, how can i add such field without using attributes fields? as attributes fields requires that the site admin to add many products and put them in one product display, i just want to keep it simple to the site admin, to make him add the product in the same way he adds a node.
Thank you.
This sounds like you just need two variations:
Product one, without frame
Product two, with frame
Each variation has it's own price and title.
You can get by without using an attribute field. Drupal Commerce renders a dropdown when there are no attributes and allows user's to pick from the product variation titles. Since you are using Inline Entity Form this should be seamless for the site admin.

Drupal dynamic product catalog (without commerce)

So, I work at a web development agency and we recently decided to give our custom CMS up and start developing with Drupal. Currently, I am developing a wholesale product website. What I need to do is to create some product catalogs without using commerce since we do not need the purchase, checkout and payment features and I thought that using the built-in Content, Taxonomy and Views features we can get our job done.
I have created the product categories in Taxonomy. The main (root) categories are main Taxonomy objects and the subcategories are terms.
I created a custom Content type called: products. In this type I have the following form fields: Product Code, Name, Image, Description and a list field to choose the Terms I would like the product to be displayed in.
I would appreciate some help in order to set the whole structure up as I am still heavily influenced by the custom CMS we used to work on that had similar content management with Joomla!
In conclusion, I would like to:
Set a sidebar menu up that contains the categories and the subcategories as a tree. I would also like the menu to be updated if any changes occur in the taxonomy (e.g I add a term in taxonomy and it shows up on the menu).
Set the structure so that when someone clicks on a category that does NOT contain products but subcategories, gets the list of the categories bellow the active one.
I am really looking forward to your answers and I'd like to thank you in advance.
You could give a try to a combination of Taxonomy Menu and Menu Block modules. Taxonomy Menu allows you to easily generate menus from taxonomy vocabularies, and Menu Block creates menus and "menus portion", for instance, from level 2 to 3 from a specific point.
So basically, you can create menus from taxonomy and then create submenus from those menus with Menu Block. It can be tricky but you can do a lot of things with these modules.
Good luck

Drupal view gives page title for search (Search Product category for...)

I created a webshop using Drupal 7 and commerce kickstart. After making some modifications and building some views i noticed the product category view not passing the right taxonomy term as page title but is see the text "Search Product category for..".
I think I am missing out on a setting or something. How do I disable the search title and start using the views title.
For reference read this post: https://drupal.org/node/1250928 it gives lots of info on this matter.
Thanks!
I found out that this was caused by not (or not correct) inhereting contextual filters from one view to another.

Wordpress: Using Custom Post Type for image list of Product

I have a Wordpress-blog with gift ideas where I write text based articles. I recently discovered Custom Post types which I believe is the solution to an feature I want to create.
What I want:
Be able to tag each custom post using the normal "Categories" and "Tags".
Create a 3x3 matrix with product images (custom posts) to be shown on top of each Category-view or Tag-view (followed by the typical article list in the category or tag).
Example:
Lets say I have a category "Gifts for mom" and tags "Pink", "Cheap"
In the category "Gifts for mom" I have 10 text articles (normal posts) discussing the difficulties of buying gifts for your mom
I create nine custom posts, each is a specific gift (e.g. A pink hairbrush). I want to place them in the Category "Gifts for mom" and tag them with "Pink".
When I view myrandomgiftblogname.com/category/gifts-for-mom I want to be able to get a view:
Gifts for mom
Product Product Product
Product Product Product
Product Product Product
Articles:
- This awesome article
- That awesome article
- Etc
I assume this is possible but don't really know where to begin. Could you point me in the right direction? Which Plugins do I need? Do I need to do any programming myself (or just plugin configuration)? Is this even possible?
The description is a bit broad, hence a bit broad answer.
Two things are needed:
1) A plugin to create the Custom Post Type.
It is considered best practice to let CPT's in Plugin territory. So you can swap designs and preserve your CPT functionality. In reality, you are asking for future problems letting this be handled by the theme.
Create your own plugin, which would contain a register_post_type and any extra configs.
Use an existent plugin, like Custom Content Type Manager.
Its Custom Fields features are quite handy as well.
Allows users to create custom content types (also known as post types) and standardized custom fields for each, including dropdowns, checkboxes, and images.
2) Learn how to use and customize WordPress Templates
http://codex.wordpress.org/Templates
Templates are the files which control how your WordPress site will be displayed on the Web. These files draw information from your WordPress MySQL database and generate the HTML code which is sent to the web browser. Through its powerful Theme system, WordPress allows you to define as few or as many Templates as you like all under one Theme. Each of these Template files can be configured for use under specific situations.
You can try the following:
Add a new Page for each category with the exact same name as the category.
In the Images menu attach to each of those pages the images you want.
In your script query for a page with a name identical to the current category, and pull all of its attachments

Giving different Post page for same type based on category or Custom Taxonomy

I'm having a site which has option to add hotels and restaurants. Both for them has different custom fields which i have added meta boxes with a plugin. But the custom fields of hotel are not needed for restuarant and vice versa.
So what I want to achieve is create extra menu on admin panel saying Add Restaurant & Add Hotel. When clicked on Hotel its should only show the custom fields configured for Hotel. I know this can be achieved by custom post types. But i don't want another post type unless i have no options.
Figured out that this is not the right place to ask.
Better try codex.

Resources