WooCommerce: Product variations that don't require all options selected - php

So I thought I could figure this out in a fairly straightforward manner, but it has been utterly perplexing me: I'm setting up a store to sell fonts. These fonts are available in a variety of licenses that affect the price: For example:
Desktop
1-5 Users
6-10 Users
10+ Users
Web
1 Domain
Up to 5 Domains
Up to 10 Domains
...etc. As the store is selling packs & collections as well as individual weights & styles, all of these variations are customisable with regards to their price, attached files, etc. Plus, due to the licensing of some typefaces, not all are available under the same licenses.
The issue: If a user selects Desktop: 1-5 Users, then they definitely shouldn't be required to select a Web license. However, if I try to add a font to my cart with just Desktop: 1-5 Users selected and no Web selection, it fails.
In the backend I currently have all Desktop variations set to 'Any Web...' and vice versa, but it doesn't make any difference.
As an addendum to this, I experimented with using jQuery to set any unchosen selection's value to 'null'; so, user selects Desktop: 1-5 Users; Web dropdown is automatically hidden and value set to 'null'. This works (sort of) insofar as the product will get added to the cart, but it appears as:
Fontname
Desktop: 1-5 Users
Web: null
Again, I can edit the template in /woocommerce/single-product/add-to-cart/variable.php to not display the null attribute on the site, but it still appears in emails, in the order on the backend, etc. Ideally I want a way to simply not have all license attributes being selected as a prerequisite of adding a font to the cart.
Hopefully I am just not seeing the wood for the trees here and missing something blindingly obvious and simple.

It might be better to split the licenses into two separate products - web and desktop.
Or perhaps you could chain or combine them using one of the Woothemes product grouping extensions. Alternatively, the Extra Product Options extension could be suitable to your needs. The Extra product options adds additional metadata to each order, you can use conditional logic on the product page to help guide a user to the best product/price match.
Good luck! eCommerce is harder than it looks!

Think about adding as default:
no web licence
no dekstop licence
It will produce:
Desktop
No desktop
1-5 Users
6-10 Users
10+ Users
Web
No web
1 Domain
Up to 5 Domains
Up to 10 Domains
In woocommerce you can select no web/desktop as default variation and uncheck visible on product page.
Similar future can be achived by PHP code by hooking to woocommerce filters, but in my opinion using product configuration is much more elegant.

Related

Magento tasks for learning

I am learning Magento. I have already installed and gone through admin side.
Have done for adding customers ,Products ,Pricing or other stuffs. Now I want to learn more things (currently don't want to go for code and database).
Can anyone post here sample tasks (specially for learning). Because as I said am new to magento and don't konow exactly what type of tasks we can do in Magento.
I want some good tricky and sample tasks to do in magento. So I can learn it more.
1.) Change the favicon logo.
2.) Change the magento home page logo.
3.) Change the Top links "name" Ex: My Cart as image.
4.) Adding new link in top links.
5.) Move the top menu navigation as left menu navigation.
6.) Creating banner slider in home page
7.) Listing the feature products in home page.
8.) Need to put newsletter subscription in footer area.
9.) Removing the magento ads in right column (i.e) The dog and poll removing.
10.) Adding the new column in sort by order in category page.
11.) In product detail page need to show product description and some other information as tab format.
12.) Magento registeration need to enable extra options like company name, phone number, address, user type.
13.) Each customer group need to show different type of price for products.
14.) While importing products we to import the tier price to each products.
15.) Creating new attributes to products. And need to import values to that new attribute.
16.) Adding custom new column while registering a customer. And it need to show in admin side as editable.
Basically you are in e-commerce domain and magneto is a e-commerce framework which provide a platform to build e-commerce application with some build in out of the box functionality so that the developer at the end of the day not have to start building things from scratch.
what type to tasks we can do in Magneto.
being a eCommerce platform it provides you out of the box functionality ranging from product management,category/catalog management,shipping,checkout process,user management,post order process etc and many other things.
E-commerce in itself start from application like B2C (Business to customer), B2B (business to business).
I want some good tricky and sample tasks to do in magento
i am not sure what exactly you mean by this statement what you want to learn how exactly flow going on or how you can customize the things.
my suggestion is to explore some e-commerce implementations like amazon,eBay etc see how things flow there and than come out what you want to have in all.
i have not worked with magento but being in e-commerce domain i know every platform provide some sample reference application so it should be the case with Magento so just run that application and see how flow is going on and play around with it.
one thing that seems good to start is checkout process as it is always an integral part of any B2C implementation.
Other aspect is Product content management.
How about learning to create tier prices for customer options? I am quite sure that you need this for the future someday.
Magento allows tier prices for products and prices for individual options. However, tier prices for individual options are not supported. Tier prices for individual options are needed e.g. when selling promotional items or textiles with custom imprints. To create individual tier prices just try one of these three options:
one of these three options:
Realizing the surcharges with Cart Price Rules
Simple Configurable Products / Better Configurable Products
Generating additional individual options with prices
In my opinion the last one is the best solution. An individual option only allows one surcharge, when more are needed (one for each tier price you want to have). So you create several options with different prices. By doing so the following module might help you. You can request it for free at: http://www.code4business.de/kontakt-impressum/.
This module requires entering of tier prices and individual options in the backend. Afterwards the prices of the individual options for each tier price are entered in the newly generated options. When you save it, the following table of individual options will be generated. In this table, the tier prices can be entered for the original individual options. After filling out all these fields, the result is expected to be in the checkout.
I hope this is the kind of learning-idea you imagined! If you have further questions just take a look at this link. It offers you detailed descriptions with pictures how to create tier prices:
http://www.code4business.de/tier-prices-for-magento-custom-options-en/

Magento: Generating Thousands of Products and Configurable Attributes

I've looked all over Google and here at SO and I just can't find a solution.
I have a store that sells custom computers. Customers are able to select a model and then configure all aspects of the computer.
I was directed to the SCP Extension for managing my Configurable Products: "With SCP you can set a price for each combination of attribute values, e.g. Standard, Intel, 4GB RAM = $500." And that works marvelously.
However, as I've started creating my products, I didn't anticipate having to create literally thousands and thousands of Simple Products for every single, minute customization... AND THEN creating the Configurable Product. Seriously... THOUSANDS! It would probably take me 2 solid weeks of full-time simple product creation.
Having said that, is there a way to create am Excel or Numbers document and then simulate all possible variations? I believe it's called a Matrix.
I mean, how else does anyone put together a shop that sells more than 20 T-Shirts with two configurable attributes (Size, Color)?
You're doing it wrong! :-)
Whereas the components themselves are the inventory items, and you have a large and arbitrarily-variable combination of those inventory items to create a purchasable product, you will benefit from using the Bundle product type. It allows you to present groups of products together and to set required and optional components.
For frontend example, see: http://demo.magentocommerce.com/my-computer.html
For backend, see: http://demo-admin.magentocommerce.com/index.php/admin/catalog_product/edit/id/165/
Added my comment as answer.
Did you see this extension mageworx.com/advanced-product-options-magento-extension.html?

Does Magento allow order and shipping restrictions by country for specific items on the product level?

the product’s page would have a “restricted countries” tab, where we can select countries that the product cannot ship to.
Nope I am afraid recently coded the functionality for a project: Few pointers how I tackled the issue:
You will have to modify the addToCart
functionality to introduce your
logic. Rewrite
Mage_Checkout_CartController::addAction()
You will also need to alter the OnePageController Mage_Checkout_OnepageController::saveBillingAction and saveShippingAction to confirm that the address choosen are not restriced
You will also need to alter Mage_Checkout_MultishippingController::addressesPostAction to do the same address checking during multi shipping checkout.
Admin Changes
You will need a product attribute called restricted_countries ...you will need to set some source and backend models to poplulate the countries in the multi select list in the product tab
I hope this puts you on the right path ... good luck.
Personally I think you should go multi-website and have the product selection, prices and delivery prices setup per currency (or region).
You then should put some GeoIP code on the index.php so that you have one URL for all of your websites.
In that way the person from region A sees the subset of products for their region based on their currency, e.g. ₡7.99 instead of an auto-converted ₡7.57, region B sees a different subset of products e.g. ₱14.99 instead of auto-converted ₱14.23 and so on.
Price points do matter if your site is to be popular, making money and a long term investment then you need price points not auto-converted prices or foreign currency only.
The multi-store, multi-website arrangement is out-of-the-box, easy to setup and with minimal burden on catalog inventory management. Work within the software and the methods available, don't reinvent the wheel.

Custom cases of product in Magento?

Setting a Magento store for a winery. They well bottles of wine, but you can only order bottles in cases of wine. There are 12 bottles of wine in a case, and you can make a custom case.
So user could pick 4 Chardonnay, 6 Merlot and 2 Shiraz to make a case of 12. But they could not just choose 4 Chardonnay and 6 Merlot. Orders have to be in multiples of 12.
Is there any way in Magento via default functionality or an extension to enforce this requirement in my Magento store?
thanks
I've not seen this specific functionality, but you could use a bundle w/ user defined quantities, with the addition of some custom logic for enforcing the multiples. This is likely to be your fastest path to getting this running.
Hope that helps,
Joe
EDIT: Resources on how to set up a bundle are a little slim on the internet. I did find an old video from when bundles were released that covers the basics.
The fast story is that you need to set up a bundle with items that are marked as "user defined qty", which will display a qty box for each block that is defined in this way. Then grab the inputs when the form submits and reject it if the quantities don't add up to a multiple of 12.
Upon consideration, pricing bundles this way may not be trivial unless you are providing a consistent price for each bottle of wine. e.g. You cannot easily jump the price from 1-dozen to 2-dozen.
What you are trying to do is what I call a "configurable bundle." The base bundle product would be a case with 12 bottles. You can then configure the bottles within the bundle.
There isn't a way to do this with Magento proper. In my former position we tried doing this with custom apparel. The base bundle product would be a blank shirt. You would then try to configure the shirt with screen printing, embroidery, etc.
We ended up creating/managing a custom object within the cart. We then had to write some custom pricing logic for the cart.
I know that this feature has been talked about for quite some time.

Magento, add Clothing size attribute without Configurable Product

I want a simple way to let my user pick there clothing size before buy
but Configurable Product seems like to much overkill. you have to make a product of every size
and then you have to make a configurable product.
the shop is for my dad and if i have to explain him how he has to do this it would be weeks for him to know this, (it took several days to make him learn to create a simple product)
Is there any other possibility to create a product and in the front end let the user select the size attribute ..
there has to be a more simple way than this ?
The reason a configurable product relies on child simple products is to keep track of inventory--the simple product is the physical, shippable unit (Crew Neck Shirt-Red-Small) and the configurable product, as you know, is a "meta" product that groups all of the (Crew Neck Shirt-Some Color-Some Size) combinations together.
If you don't care about having your Magento store track inventory, then you can use a simple product with custom options. This is usually used for things that you make on the fly, like monogramming a t-shirt, or screen printing a t-shirt. Create the simple product and take a look at the Custom Options tab on the left side. There you can define a drop-down for your size and specify the options there. Unlike a product attribute, however, I'm pretty certain that you'll have to re-create the size options for each product that you decide to sell this way.
The Magento Web site has a video tutorial that shows how this works. You might show that to him.
I don't think you'll find too many arguments that the Magento admin interface is extremely confusing--even for computer savvy users--but it is what it is. Good luck!

Categories