Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 16 of 17
Configurable Products? 
 
emmenko
Sr. Member
 
Total Posts:  96
Joined:  2010-10-20
 

@bokvis

Sorry (if I may ask) but which kind of Configurable Product are you setting up??? 2000 variants seems too much for a single product....or did I misunderstand?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bokvis
Jr. Member
 
Total Posts:  25
Joined:  2010-10-04
Gloucester
 

Hello

Thank you for the responses.

I sell 4 different types of pond. liners. One of the materials is called Greenseal Rubber - and this is available in 3 different thicknesses being 0.75mm : 0.85mm & 1.0mm

In each thickness, a customer must be able to select different size variations or combinations to suit their requirement....hence quite a few size variations / combinations as the measurements go from i.e. 1.50m in 50cm increments up to i.e 40.0m.... so i am apparently looking at approx 2000 diffent size combinations.

I am having the website developed by a 3rd party - he says the only way forward is to do it as a simple product + custom option rather than a Configured Product.....

For me it is a steep learning curve - and i do not want to find out at a later stage that there are restrictions doing it one way as opposed to another. For me,
- changing the prices easily and quickly is very important
- stock management
- Ability to integrate to accounting Package (Sage Accounts 2001)

So i am a little concerned about what to do. I have just cancelled my dedicated server with 1&1;as the memory was only 40m and according to my developer i would need at least 256m - so that is my next hurdle.

Any advise would be greatly appreciated
Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
QuartSoft
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2010-05-26
 

If you need to manage stock per each combination product - custom options won’t work, because in this case there’s only one product.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bokvis
Jr. Member
 
Total Posts:  25
Joined:  2010-10-04
Gloucester
 

Ok - so based on my requiements - what is the best way forward. Surely there are companies out there which have multiple size variations / combinations for a specific product / material - so i would be very interested to see what there solution is....

I think the main problem is that i have 2 seperate \"drop down\” lists with sizes in increments of 0.50m - so as explained a customer can select his width i.e. 5.0m and then on the other drop down select the length i.e 20.0m which would then generate a sqm area and an overall price.....  so in this case 5.0m x 20.0m 100sqm = £200.00

and this would be the same in each thickness of the material - so each thickness will have nearly exactly the same size combinations / variables available.
0.75mm Greenseal
0.85mm Greenseal
1.00mm Greenseal

So if i want to be able to change my pricing easily and have stock management - is there a solution ?
Or do i have to use Simple + Custom and loose the ability to track stock.....

Appreciate if you could literally spell it out for me - my developer seems to think the only option i have is Simple Product + Custom......i really have to be sure and appreciate your comments and patience with helping me find a appropriate workable solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
emmenko
Sr. Member
 
Total Posts:  96
Joined:  2010-10-20
 

Mmh....but I still don’t see the point to do 2000 simple products associated to a configurable one, for some reasons:

1- if you have to do the import you have to associate manually (in the csv or from backend) the simple products with the configurable one...that a lot of work

2- basically you have in the Product Detail page your product with the “dropdown menus box” where you select the options (size and whatever). But if there are like 2000 options available I think the customer will be a little confused...is that really so what you want to do or is something different?

3- also (if I understood correctly) you want to add custom price so that, for each measure the customer selects, the price will be updated. Isn’t that a little too much complicated all of that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bokvis
Jr. Member
 
Total Posts:  25
Joined:  2010-10-04
Gloucester
 

1- if you have to do the import you have to associate manually (in the csv or from backend) the simple products with the configurable one...that a lot of work .
ANSWER:  This is the way it was originally setup by my developer until he ran into problems.

2- basically you have in the Product Detail page your product with the “dropdown menus box” where you select the options (size and whatever). But if there are like 2000 options available I think the customer will be a little confused...is that really so what you want to do or is something different?
ANSWER: OK - let me explain it another way - maybe this will make it clearer......

i sell pond liners - and not everyone wants the same size liner for their pond - as most people di the hole first then measure it - and then order the liner. So i could get an order for any size combination i.e. 6.0m x 5.0m, 6.0m x 5.50m, 30.0m x 7.50m etc, etc - so the only way i forsee around this is to setup 2 seperate dropdown menus for both the length and width available sizes....these increase in increments of 0.50m. hence length goes from 1.50m; 2.0m ; 2.50m ; 3.0m etc etc - and the width does the same.
So the customer selects his width (to closest 0.50m) and the length available (to closest 0.50m) - so i.e.  6.0m x 6.50m - and it generates a price for the item based on the sizes entered x sqm price = cost.

You say it will be confusing for the shopper - but i cannot see another way of doing it - i am open to suggestions on how to try and show the various size options / combinations ......

3- also (if I understood correctly) you want to add custom price so that, for each measure the customer selects, the price will be updated. Isn’t that a little too much complicated all of that?

ANSWER: As per last answer - most sizes will be different - hence will have a different price based on length x width x sqm price = cost......once again i am open to suggestions on how this can be acheived in Magento

I hope i have managed to explain better - i am obviously looking for the easiest achievable solution which will not cause problems as highlighted by yourself…

Thank you again - i hope i have explained it ok

 
Magento Community Magento Community
Magento Community
Magento Community
 
emmenko
Sr. Member
 
Total Posts:  96
Joined:  2010-10-20
 

Mmh ok...the first thing that comes in my mind at the moment ist the following:

- forget simple products and configurable products....why don’t you do something simplier?
I mean, you customer has to chose width and length for a product. Why instead of create all of these “dropdown options” don’t you create simply 2 fields where the customere WRITES his measures??

Let me explain:

instead of the dropdown box you create something like that:

Please chose a WIDTH:  |_____| m
Please chose a LENGTH:  |_____| m

So the customer will write his custom measures.

The only problem is to develop a script that calculate the measure with its price and shows in the page, once the measures are entered.
I think for a programmer this isn’t a big deal...which are the advantages to do that??

1- you can create only one simple product for each product (or a few simple products + configurable if you want to add some options)
2- this means everything is more organized and you can mange better all of your products
3- these width and length information will be added to the order (you have to develop that) so you are able to see the measures and provide the right product to be shipped.

If you like that solution, I think it could be a good way to solve your problem!

If you don’t understand something, just ask smile

Cheers

Nicola

 
Magento Community Magento Community
Magento Community
Magento Community
 
bokvis
Jr. Member
 
Total Posts:  25
Joined:  2010-10-04
Gloucester
 

Thank you for your response - i have gone back to my developer - and he has come up with the following example for my comments;

http://s347795977.websitehome.co.uk/magento/index.php/ponds-liners/0-75mm-greenseal.html

For the purpose of this excercise it is just the one material
0.75mm Greenseal Rubber - the 0.75mm is the thickness of the material

So the customer navigates as follows
- selects the width from dropdown menu - this filters all sizes available only in that specific width
- selects the length from a drop down
- selects colour
- selects price .....not sure why that is there

My comments are that it looks this is a program or setup written for i.e clothing rather than what i want it for - as not very clean and could be a little confusing to a visitor

I like the idea of a customer just entering the width required (in increemnts of 0.50m) and length required (in increments of 0.50m) this would then generate a price

Nice simple and clean.......is this still possible do you think

 
Magento Community Magento Community
Magento Community
Magento Community
 
emmenko
Sr. Member
 
Total Posts:  96
Joined:  2010-10-20
 
bokvis - 26 November 2010 07:06 AM

Thank you for your response - i have gone back to my developer - and he has come up with the following example for my comments;

http://s347795977.websitehome.co.uk/magento/index.php/ponds-liners/0-75mm-greenseal.html

For the purpose of this excercise it is just the one material
0.75mm Greenseal Rubber - the 0.75mm is the thickness of the material

So the customer navigates as follows
- selects the width from dropdown menu - this filters all sizes available only in that specific width
- selects the length from a drop down
- selects colour
- selects price .....not sure why that is there

My comments are that it looks this is a program or setup written for i.e clothing rather than what i want it for - as not very clean and could be a little confusing to a visitor

I like the idea of a customer just entering the width required (in increemnts of 0.50m) and length required (in increments of 0.50m) this would then generate a price

Nice simple and clean.......is this still possible do you think

Hi,

I saw your example. It doesn’t make sense something like that. As you said, it’s a little confusing.

Take a look at this example for my idea (it’s the first thing I found serching in Google) --> price calculator
What you have to see is the idea of the structure...some fields/cells (which have a requirement input) and the price at the bottom.

My suggestion is to talk with your developer and ask him to do something like that.
It will solve a lot of your problems I think.

Cheers

Nicola

 
Magento Community Magento Community
Magento Community
Magento Community
 
nabler
Sr. Member
 
Total Posts:  80
Joined:  2010-07-27
 

Thnx For All awose member finally i made it....
this is really sweet victory you all really save my ass..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Diogo Barioni Abdalla
Member
 
Total Posts:  44
Joined:  2009-03-25
 

Hello,

I am a php developer customizing a Magento store for the first time. My client has a store with around 5 thousand products, mostly t-shirts with configurable color and size, and I need to import its database (which I already have in xls format, had to export from a MS-SQL database) to Magento.

So looking for a solution to import those t-shirts as configurable products, Ive found this page http://www.ayasoftware.com/content/how-import-configurable-products-csv-file-magento-system , and then later this thread, which, as I understand, is the origin of that Productwithconfigurablesandcategories class they got on that page.

After applying that label fix from some pages ago (my Magento is 1.4.1) , I was able to get it working. But then I realized it will only import the configurable product itself, and will not create the simple products to be associated with the configurable product. Then is not good enough for me and I decided to increment it.

What I want is to import a csv that will be like this

"websites","type","attribute_set","config_attributes","sku","category_ids","name","meta keyword","description","short_description","custom_made","price","shirt_size","color","qty","status","visibility","weight","is_in_stock"
"base,masculino,feminino"
,"configurable","Camisetas","color,shirt_size","111111","42","Teste","teste","ubaubauba","uuuu","Sim","115","Feminina GG,Feminina G,Feminina M","Amarelo,Branco,Preto","50","Habilitado","Catálogo, busca","5","1"

Where Im giving “Amarelo,Branco,Preto” has colors and “Feminina GG,Feminina G,Feminina M” as sizes.

And then have the script automatically create not only the configurable t-shirt “teste”, but also all the simple products corresponding to all combinations of shirt_size and color.

So I came up with this code, which I placed right after “$product->setCanSaveCustomOptions(true);”

$vals = array();

                foreach(
$configAttributeCodes as $code)
                
{
                    $arr 
explode(','$importData[$code]);
                    
$vals[] $arr;
                
}//foreach codes

                
$combs $this->getCombinations($vals);
                
$associated = array();

                foreach(
$combs as $comb)
                
{
                    $data 
$importData;
                    
$data['name'$importData['name'].' '.$comb;
                    
$data['sku'$importData['sku'].'-'.str_replace(' ''-'$comb);

                    unset(
$data['config_attributes']);

                    
$data['descripition'$data['name'];
                    
$data['short_description'$data['name'];

                    
$data['visibility''Not Visible Individually';
                    
$data['type''simple';

                    
$values explode('-'$comb);
                    
$ti count($values);

                    for(
$i 0$i $ti$i++)$data[$configAttributeCodes[$i]] $values[$i];

                    if(
$this->saveRow($data))$associated[] $data['sku'];
                
}//foreach $combs as value

                
$importData['associated'implode(','$associated);

Basically, this will get all possible combinations of color and size, then save the corresponding simple products (automatically creating the name and sku for each combination) and then put the sku codes of all of then into $importData[’associated’] so they will be associated with the configurable product.

In theory, I think is correct. And its almost working. The script will successfully create the simple products, but then it will fail trying to save the configurable one. It will give me this error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘210-1’ for key ‘IDX_STOCK_PRODUCT’

Where 210, curiously, is the ID of the last created simple product.

So, I dont know where to go from here. What Im doing wrong? And feel Im so near, but doing something stupid.

Any help would be much appreciated.

Thank you

EDIT: Ok, so it has something to do with the stock, since that index belongs to the cataloginventory_stock_item table. But I still got no clue whats going wrong here.

EDIT 2: If I unset both ‘color’ and ‘shirt_size’ from $importData before saving the configurable product, I dont get the error. But then the configurable product is saved like a simple product, with no associated product anyway. Oh boy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Diogo Barioni Abdalla
Member
 
Total Posts:  44
Joined:  2009-03-25
 

Anyone, please

 
Magento Community Magento Community
Magento Community
Magento Community
 
Diogo Barioni Abdalla
Member
 
Total Posts:  44
Joined:  2009-03-25
 

Still trying…

 
Magento Community Magento Community
Magento Community
Magento Community
 
bolasevich
Sr. Member
 
Avatar
Total Posts:  235
Joined:  2008-03-04
Newington, CT USA
 

@Diogo Barioni Abdalla

i think it has something to do with the stock of the products.. maybe you need to be setting these for all products you are “creating” attempting to import because that error in some cases could translate or be the issue of ‘null’ aka not being set and when its trying to insert ‘null’ and of course it can’t just a theory i could be wrong smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Diogo Barioni Abdalla
Member
 
Total Posts:  44
Joined:  2009-03-25
 

Thanks for the reply, but I was able to fix it.

The problem was actually here:

public function getProductModel()
    
{
        
if(is_null($this->_productModel))
        
//if(true)
        
{
            $productModel 
Mage::getModel('catalog/product');
            
$this->_productModel Mage::objects()->save($productModel);
        
}
        
return Mage::objects()->load($this->_productModel);
    
}

The class reuses the model once it has been created (because its meant to insert one product at a time, not a bunch of then). So, after inserting the last simple product, the garbage it left on the model would cause that error inserting the configurable one.

I solved it by changing the position of that block of code where I create the simple products to the top of “saveRow”, and right after doing it I manually set the model to null:

$this->_productModel null;

This solved everything and I was able to insert 950 configurable products with over 25000 simple products automatically created for then (there was a lot of possibilities for each configurable product)

I putting my class here (along with a sample csv), so if anyone ever needs to import a big load of configurable products and auto create the simple ones, they can try it. Its not fast at all, mind you: took a very long time for each product in my case (because one t-shirt would usually have more than 150 possible combinations of size and color), but it worked.

File Attachments
Productwithconfigurablesandcategories.php  (File Size: 16KB - Downloads: 411)
configurable_sample.txt  (File Size: 3KB - Downloads: 476)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 16 of 17