Author Topic: Color x Size x Quantity  (Read 27847 times)

webcorp

  • Beginner
  • *
  • Posts: 11
Color x Size x Quantity
« on: October 03, 2010, 06:20:43 AM »
Hi all

Im trying to do something like this :



I dont know if is possible to do this using admin tools only ( attributes, product type, etc )

If isnt possible I would like to join a similar project.

Thanks in advanced.

[attachment cleanup by admin]

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #1 on: October 29, 2010, 00:33:48 AM »
add attribute: colour or size (in your case both will give you a goal)
add new items (3 items) plus then use attribute and properties on each item

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #2 on: October 29, 2010, 02:45:28 AM »
Thanks but dont works
I need a grid with first column ( attribute A ) x first row ( attribute B ) x cells ( quantity )
Im close to solve using bidimensional array.

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #3 on: November 01, 2010, 12:41:56 PM »
It does work, ok maybe I will show you the stewp by step guide:
1. New product, and enter some details, i.e. SKU: "XXXX" and Name: "Product" and Price i.e "3" (it will be replaced by the item prices so don't worry of it)
2. Click "Add Attribute" on the top and make a name: "Colour"
now you need to add 3 new items...
3. Click "New Item" on the top and enter some details, i.e. SKU: "XXXXa" and Name: "Product Red" and Price: "6"
Open a tab: "Item status" and add
- New attribute: "Size"
and 3 properties:
- Small (0)
- Medium (+2)
- Large (+2)
and on same tab on the very bottom you will see empty field: Item Attributes; Colour: ... put "Red" in there
4. Click "Add Another Item" on the top and enter some details, i.e. SKU: "XXXXb" and Name: "Product Green" and Price: "4"
Open a tab: "Item status" and add
- New attribute: "Size"
and 3 properties:
- Small (+2)
- Medium (0)
- Large (+2)
and on same tab on the very bottom you will see empty field: Item Attributes; Colour: ... put "Red" in there
5. Click "Add Another Item" on the top and enter some details, i.e. SKU: "XXXXc" and Name: "Product Blue" and Price: "3"
Open a tab: "Item status" and add
- New attribute: "Size"
and 3 properties:
- Small (+1)
- Medium (+2)
- Large (0)
and on same tab on the very bottom you will see empty field: Item Attributes; Colour: ... put "Red" in there

Please let us know if it works or if you can't get it to work I will do same on my site and will show you the screenshots with these steps.

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #4 on: November 01, 2010, 14:04:56 PM »
Thanks for reply

But I need a "grid" exactly as pic above with all attributes displayed to type quantity only ... instead combos to select ( colour and size ) first.

( I tried "Use List box for child products" in parent already )

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #5 on: November 01, 2010, 22:22:51 PM »
Do you want to show the grid somewhere on the product page (flypage) to inform the user only or you want to get atributes and its properties displayed in this way?
If you want to show it only, then you need to edit your template and request database of these details.
If you want to show your attributes and properties in this way I have no idea how do you want the user to pickup the colour and size? dropdown menus or radio buttons?
Can you be more clear?

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #6 on: November 02, 2010, 00:36:24 AM »
Do you want to show the grid somewhere on the product page (flypage) to inform the user only or you want to get atributes and its properties displayed in this way?
Yes. I want to replace attibutes/properties combos and unique quantity input with a grid.

If you want to show it only, then you need to edit your template and request database of these details.
If you want to show your attributes and properties in this way I have no idea how do you want the user to pickup the colour and size? dropdown menus or radio buttons?
Can you be more clear?
I dont want pickup properties. Attibutes/Properties ( max 2 ) must be exactly like pic above ( first row / first column )
User fill size inputs only then click a Buy button once to buy ( as sample/pic above ) :
Red Small N units
Red Medium N units
Red Large N units
Green Small N units
etc ...

This is used specially in wholesale systems. Where users are dealers.

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #7 on: November 02, 2010, 01:21:58 AM »
Something like this :

<?php

// Attribute A - query result
$size = array('Small', 'Medium', 'Large');

// Attribute B - query result
$colours = array('Red','Green','Blue');

echo "<table>";

echo "<tr>";
echo "<th scope=\"col\"></th>";
for($n=0;$n < sizeof($size);$n++)
{
echo "<th scope=\"col\" align=\"center\">$size[$n]</th>";
}
echo "</tr>";

for($i=0;$i < sizeof($colours);$i++)
{
echo "<tr>";
echo "<th scope=\"row\">";
echo $colours[$i];
echo "</td>";
for($j=0;$j < sizeof($size);$j++)
{
echo "<td><input type=\"quantity_$colours[$i]-$size[$j]\"></td>";
}
echo "</tr>";
   
}

echo "</table>";

?>

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #8 on: November 02, 2010, 02:14:28 AM »
I have modified flypage and other files and I use multi-qty boxes to get the total qty number. So you need nine qty boxes and count it to one total qty and then you will use attributes, right?


[attachment cleanup by admin]

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #9 on: November 02, 2010, 02:41:35 AM »
Well ... almost

I can have more than 9 quantity fields.

See my sample code.
Change $size array to XS, S, M, L, XL, XXL. Now we have 18 quantity fields.  :)

I need get attributes/properties from db and make a grid with these values.
I know how many attributes I have ( 2 - color and size ) but I dont know how many properties each attribute have ( can be S, M, L or XS, S, M, L, XL, XXL or 7, 8, 9, 10, 11 or ... )

-------------

Good job for estimator

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #10 on: November 02, 2010, 12:25:39 PM »
I don't understand how do you want to price your product.

If these 9 or more fields are for putting the quantity only then we are talking about multi-qty boxes and not about attributes and its properties.
If they are for putting quantity but also each of them have different prices then you will need qty box for each atrribute.
Simple question:
Can you get it to work (count) correctly with VM but it is wrong displayed or you can't do it with VM at all for now?

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #11 on: November 02, 2010, 15:40:59 PM »
I don't understand how do you want to price your product.

If these 9 or more fields are for putting the quantity only then we are talking about multi-qty boxes and not about attributes and its properties.
If they are for putting quantity but also each of them have different prices then you will need qty box for each atrribute.
Simple question:
Can you get it to work (count) correctly with VM but it is wrong displayed or you can't do it with VM at all for now?

Different prices ?
Who is talking about different prices ?

Pretty simple :
One product
Two attributes
Each attributes with many properties
One cross-table/grid with :
. Attribute A in the first row
. Attribute B in the first column
. Input fields in the cells for quantity

Like a sample pic/code above

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #12 on: November 02, 2010, 17:36:40 PM »
If each item cost same then you don't need to use any properties.
You need only attributes without properties.
You can determine the attributes to be shown in new row when their names will have "magic" word in.
Do you have many products? Will you use similar products in same category? Will one flypage be enough for all your products?
When you change the flypage then all products in the category will need to use it.

webcorp

  • Beginner
  • *
  • Posts: 11
Re: Color x Size x Quantity
« Reply #13 on: November 03, 2010, 00:19:35 AM »
Sorry easy but you are trying to turn my life hard.

Default vm attributes system dont make a grid.

I need edit default vm templates files ( addtocart_list_single.tpl.php; addtocart_list_multi.tpl.php and others )

Like I said before

One product
Two attributes
Each attributes with many properties
One cross-table/grid with :
. Attribute A in the first row
. Attribute B in the first column
. Input fields in the cells for quantity

Like a sample pic/code above

Do you have some suggestion to do THIS ?

Im close to make exactly THIS using array to make a grid and output to cart ( my sample code is wrong - my bad )

I have a lot of others issues ( like to create many products relationships to a same attribute, etc ) ... but not now.
Now I need to start. With a grid.

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Color x Size x Quantity
« Reply #14 on: November 03, 2010, 00:58:21 AM »
i will have a look at these files tomorrow maybe but I think you need to change much more than you think, i will try my best,
do you need to change price in fly too?

in my case i use attributes without properties and they are shown like input boxes, then i have a script to add them together abd that's all regarding the quantity.