Drupal Commerce Products for printing company - drupal

I'm new to Commerce I hope some kind fellow could give me some directions here.
I am creating an ecommerce website for a printing company. I will give an example of what I require
For instance they will offer A6 flyers but these come in different specifications each with differing prices
Here is an example:
http://4frontdesigns.co.uk/Untitled-1.jpg
So down the left column are quantities of flyers and along thw top different speciifications of those flyers with the prices shown in the middle.
Any help much appreciated
Can I just add each variation of these one by one as it is not possible to just say that a certain additional attribute to the product will add so much $$ to the base price.
Would I just add each variation one by one then some how pull these all into one display?

You could use the commerce price table module like Flo suggested or look at the Price attributes Module https://www.drupal.org/project/commerce_pricing_attributes
It uses option sets and then add to (or subtract from) the price based on the selected attribute.

The answer for me was to create each product variation as its own product. So every variation gets added as a separate product.
If you are wondering how to add different variations to product such as paper size or colour, you would do this with taxonomy. Simply create a taxonomy term called colour and then add all the colours into this term that you would require.
Then when you create your product type in commerce, you would add this as an option to choose from when adding products by doing the following. Go to manange fields for the product type you want to add it for and add a new field, type of data = term reference. You will then select the desired taxonomy term and also there will be an option to 'Enable this field to function as an attribute field on Add to Cart forms.' - You want to select this!
Then what you do is create a product display and pull all these in to a single page, which then gives you drop down options to change, and the price changes accordingly in real time.
You can create a product display by creating a new content type first, call it product display... Then add a field to this content type which is a 'product reference'.
Now add new content, pick to create a product display (what we have just created) and choose the products that you want to appear on that page.
Then automatically Drupal Commerce will take care of the rest. Hope this helps someone!

Related

Customize function Variation product in Woocommerce

I have a project in wordpress and I am using woocommerce.
I have 3 attributes for each product and some variation. Look like this:
Now is mandatory to choose at least 1 variation for each attribute in order to get a price.
I wonder if its possible to get out a price from a first choice so I dont need to be forced to select the second and third attribute.
In my case I would like to get a 25 euro price if I select "digital".
So in some way "hide" or obfuscate all the other choices when "digital" is selected.
I found this plugin: "Simple linked variations for WooCommerce". but this just hide 1 variation based on one attribute and it does not show the price either.
I guess there must be something in the code that show the price ONLY if all 3 attributes are selected. And can hide/obfuscade another attribute (or give value 0).... ?
I solved it using product add-ons" instead of variations.
https://woocommerce.com/products/product-add-ons/
This extension lets you create various add-ons for a product, and you can set up conditions like the one I describe.

calling of one taxonomy from another taxonomy, so both of them have used in the same content type

Can we call one taxonomy term from another as a parent and child relation for example I need to click on product category and that show me product series page and when I click on product each series that will lead me to actual product detail means node, so I have two taxonomies category and series I am about to click on category to carry me to series page and then to click on series page to carry me to product detail page on the concern series”
no codebase problem
i am expecting that these two taxonomies may be used as i have mentioned in the question summary but, i can't do it so i hope some help in resolving this issue
Let's look at this answer, I hope it will help you.
Taxonomy terms from the same vocabulary filtered and referenced on multiple content types
To do this you’ll need to have the Entity Reference module installed. So get that out of the way quickly with drush dl entity reference -y and drush en entityreference -y if you haven't already.
First up, we need the taxonomy set up.
Let's demonstrate with the help of an image.
You’ll notice that these terms could be more or less grouped into two categories: Transport and Sleeping. One term (couchette) kinda fits both criteria and is there to exemplify the reason for not using 2 different vocabularies to handle the issue. Now we need to technically make the distinction between these terms as well and since they are entities, we can use a field for that.
So we can now go ahead and add a new field to this vocabulary of the type List (text) with whatever widget you’d like (and let’s call the field Type). You should make the allowed number of values unlimited and put the following in the allowed values list:
Edit each term and select the appropriate type. As expected, for the term couchette, you should select both options.
Now that we have our taxonomy squared away, it’s time to create a View that will handle the filtering of these terms. Because if we now add the Tags taxonomy term reference field to our content types in the normal fashion (as it is already present in the Article content type) we’ll be able to select all the terms in the vocabulary for all the content types. And that's not what we want now.
So create a drupal 7/8 View that shows taxonomy terms of the Tags vocabulary - let’s call it Tags Filter. Add 2 displays of the type Entity Reference and a filter of the field we added to our terms earlier. So for instance the first display can show the terms which have Sleeping selected and the other one can show terms which have Transport. Save the View and you can close it.
Now finally we can edit our content types and add to each a new field of the type Entity Reference with a select list widget. For the target type select Taxonomy term and under Entity Selection choose the following: for Mode, go with Views: filter by entity reference view and then select the View in question - one of the two displays which we created earlier. In the picture below, I named one of the displays

how to limit view to just show each type one time?

I have a content type what is news, the news has a field type that is List (text) to keep different types of news. for example I have Health, Sport, Economic and etc.
So now I am going to create a block and have each of these type in that as a hyperlink.
I can do it and I created a new view block but each news_type may showing more than one time according to published content.
How to set the view (for block) to just show news_types and show them just one time?
You can achieve this by following the steps given below:
Enable aggregation under Advanced Accordion of the view
Add Nid field & set aggregation type as Count Distinct
Exclude Nid field from display
Add news type field & set Aggregation type as Group results together, in Group Column select Value option from dropdown
Remove Publishing Date from sort criteria
Please check attached screenshot for reference
You can check this question for more information, and maybe help you.

Custom loop for getting products flagged as new

I was looking for a way to build a custom loop to get the products flagged with the "new" label.
I could use the sort from the insert time, but that would always include a certain number of products, my goal here is to get those products that conform to the WooCommerce setting that says the product is considered new for a given number of days.
i have a free plugin - WooCommerce Product Badge, it has your requested feature to display "New" label with certain days defined.

Extra options for Custom taxonomies Wordpress

I have to add simple options to my custom taxonomy (genre) for each custom post included in that specific taxonomy.
Taxonomy name: Genre
Taxonomies: Blues, Jazz, Rock
Custom post name: Bands
Bands: Band One, Band Two Band Three, Band Four
So basically going to the Jazz taxonomy options, should give me options for the Jazz bands:
Band Two {text_field}
Band Four {text_field}
I'm not achieving this with Advanced Custom Fields so I guess I need to write it? Or is there a plugin to save my life? If not where should I start looking?
If what you mean is that you want to extend your custom taxonomy to have more fields that the default: Name, Slug and Description, you can:
Use a massive plugin like Pods, which allows you to do what you want to do and much more stuff. See their docs.
Use a simple plugin like Tax-Meta-class, intended just for that purpose, which does not add many (probably unnecesary) code.
Try to do it manually, like in this example.
Note that I have not used any of these, but I'd strongly suggest you to try the option 2.
EDIT
Actually, if you're already using Advanced Custom Fields plugin, it allows you to do what you're looking for!
You just need to create a new Field Group and set up the custom fields you want as usual. Then, in the box Location, you need to set a Rule like this:
Show this field group if Taxonomy Term ----- equals to -----
Genre
This way you have all the power of ACF to create select-boxes or whatever you need...
EDIT 2
If what you want is to have different custom fields in a Post, depending on the Terms that this post has for a given taxonomy, you have to set up a Rule for your Field Group like this:
Show this field group if Post Taxonomy ----- equals to -----
Jazz
This will display this Field Group in all the Bands with a value of Jazz in the Genre taxonomy...

Resources