Latest News: (loading..)
Sign in to follow this  
Followers 0
Jack_mcs

Attribute Qty Product Info

178 posts in this topic

Hey!

Huh, i have a problem..we are running a baby and children clothes store. I am very happy with oScommerce. But i still have one thing i'd like to get clear with.

Problem is here: in example if i insert product "military sweater" i will insert sizes 5 years, 6 years etc. These will apper in drop-down menu. And i also set the amount of how much i have "military sweater" total (ie. 5yrs 3pcs. ; 6yrs 2pcs = 5pcs(total)). How is possible to insert amount for each size separately. (It is not possible to do it right now, i just can set total amount..).

I am sorry, but my english is not perfect. If there is anything You need to get more clear before you can answere to me, then please ask.

I would appreciate anyones help and ideas how to solve this little problem.

 

Thank you in advance...

 

Kaspar,

Estonia

Share this post


Link to post
Share on other sites

Have you installed this contribution? It doesn't use dropdown's so it sounds like you haven't. It will probably do what you want.

 

Jack

Share this post


Link to post
Share on other sites
Have you installed this contribution? It doesn't use dropdown's so it sounds like you haven't. It will probably do what you want.

 

Jack

 

Could you please give me the link of what contribution you mean. Would appreciate that.

 

Thanks in advance again..

 

Kaspar,

Share this post


Link to post
Share on other sites

Hi all,

I want ask a little question.

I tried this contributions, that’s great ! Very good job Jack !!!

But I’ve noticed that with this features I lost an important OSC functionality, isn’t possible manage, for example this case:

manage the actual attribute price attribute quantity product but with … the useful option attribute combobox with the attribute options that they don’t modify the price.

 

For example, I want sell T-shirt: I sell T-shirt with 3 colours (red, blue and yellow), all with the same price, but the price change for the T-shirt size (example: S, M, L,…).

 

I think that it is very userful maintain the combo for the attribute options that they don't modify the price (the colors) and use the “Attribute Qty Product Info” contribution to choose the T-shirt size and quantity.

 

Which are your ideas? Is it possibile make that?

 

Marco

Share this post


Link to post
Share on other sites

Great Contribution!

 

I have one modification. After installing this contribution, the attributes that didn't have a price change, wouldn't show up. All I did was change the "0" to a null in the if clause, and it worked.

 

Here is the change:

 

In the products_info.php file,

 

Find -

if ($products_options['options_values_price'] != '0') {

 

And change it to -

if ($products_options['options_values_price'] != '') {

 

Thanks!

Share this post


Link to post
Share on other sites

One more comment here...

 

In the instructions txt file, there is a typo in the code causing the attributes not to be added to the cart correctly - no attribute would be displayed, and the product price would be that of the product not, of the attribute.

 

This is the original text:

-----------------------------------------------------------------------------
Around Line 138 (listing the attributes in table form):

Find:
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
	  if ($products_options['options_values_price'] != '0') {
		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

Under this ADD ( before the } ):

if ($products_options['price_prefix'] == '+') {
	   $price_with_attribute = ($product_info['products_price'] + $products_options['options_values_price']);
} else {
   $price_with_attribute = ($product_info['products_price'] - $products_options['options_values_price']);
   }
  ?>
		<tr>
		  <td class="main" align="center">
		<?php echo $products_options['products_options_values_name'];
			  echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']);
			  echo tep_draw_hidden_field('b[]',$products_options_name['products_options_id']); ?>		  </td>
	  <td class="main" align="center">
	<?php /* uncomment if you want to show the model number
		  echo $product_info['products_model']; */
	 ?>
	  </td>
		  <td class="main" align="center"><?php echo $currencies->display_price($price_with_attribute, tep_get_tax_rate($product_info['products_tax_class_id'])); ?></td>
		  <td class="main" align="center"><?php echo tep_draw_input_field('quantity[]',$value = '0',"size=2");?></td>
	 </tr>
 <?php	
  $x++;

 

This line -

echo tep_draw_hidden_field('b[]',$products_options_name['products_options_id']); ?>		  </td>

 

Needs to be changed to this -

echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?>		  </td>

 

I found the fix in the package products_info.php's file.

 

Thanks.

Share this post


Link to post
Share on other sites
What version are using? That was a problem in the original cersion but was fixed with my version.

 

Jack

 

 

I downloaded the latest version today. The zip file is Att_Qty_Product_Info_3.zip.

 

This is from the included instructions file:

***Editing Histoty****

10/24/2006 - by Jack_mcs
- Fixed bugs so it now works correctly

7/19/2005
-CHANGED APPLICATION TOP CODE/WAS NOT ADDING PRODUCTS W/OUT ATTRIBUTES.

***END EDITING HISTORY***

 

Thanks.

Share this post


Link to post
Share on other sites

I just downloaded that version and in the product_info.php file it has

echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?>

 

Jack

Share this post


Link to post
Share on other sites
I just downloaded that version and in the product_info.php file it has
echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?>

 

Jack

 

 

That's correct, and that's how I figured out my problem. I was originally following the included instructions text file, and there it has it as "'b[]'".

 

Leibtek

Share this post


Link to post
Share on other sites

Slight problem with this otherwise fine contrib - i need to show prices that are in fractions of a dollow (ie .10) and unfortunately - they all show as $0. Even a price of $1.50 is only calculated as $1.

 

Please help.

Share this post


Link to post
Share on other sites

The prices are displayed fine here. They are displayed as the actual cost. So if the product costs $1 and you add an attribute that is +$1, then the displayed price will be $2. I just tried it with fractions and it worked as expected.

 

Jack

Share this post


Link to post
Share on other sites

Hmmmmmmmm.... thanx Jack. Will start from scratch again till i get this sorted ;) I "think" this is an issue that has arrisen after adding FEC... will backstep a bit and see.

Share this post


Link to post
Share on other sites

odd - the only price that is showing up for me is the actual product price - if i set it to $0 then thats the price - if I set it to $8 then thats the attribute price....

Share this post


Link to post
Share on other sites
One more comment here...

 

In the instructions txt file, there is a typo in the code causing the attributes not to be added to the cart correctly - no attribute would be displayed, and the product price would be that of the product not, of the attribute.

 

This line -

echo tep_draw_hidden_field('b[]',$products_options_name['products_options_id']); ?>		  </td>

 

Needs to be changed to this -

echo tep_draw_hidden_field('b',$products_options_name['products_options_id']); ?>		  </td>

 

I found the fix in the package products_info.php's file.

 

Thanks.

 

Instruction file still has this descrepency, found another also

 

In the instruction file for application top it says this:

$c = array((int)$HTTP_POST_VARS['b'][$x] => (int)$value);

when I add a product to the cart I was getting no option or price, when I compared it to the application_top.php file I

 

found this was another typo, when I changed my code to be the same as in the application_top.php file, it worked for me:

$c = array((int)$HTTP_POST_VARS['b'] => (int)$value);

 

hth,

ally

Share this post


Link to post
Share on other sites

Hi guys,

 

This looks like a good mod but I was wondering if it is possible some how to add the quantity box next to the Buy it Now button with out any alterations to the layout in that section?

Share this post


Link to post
Share on other sites

my problem is that if you add a product attribute#1 to the cart

and then go buck and add the some product with attribute#2 in cart

the cart shows two times product attribute#1

 

otherwise very nice

Share this post


Link to post
Share on other sites

Thanks for a great contributions!

 

It work almost perfect. I only have the problem when we do a specials.... they new prices is not showen on the products_info.php

 

Can i change something so it is showen?

 

Thanks

Share this post


Link to post
Share on other sites

I would like to show the '+/- XXX' attribute price, instead of the actual price with the attribute.

 

Is that possible? (to allow multiple attribute qty orders)

 

Cheers,

EricK

Share this post


Link to post
Share on other sites
Thanks for a great contributions!

 

It work almost perfect. I only have the problem when we do a specials.... they new prices is not showen on the products_info.php

 

Can i change something so it is showen?

 

Thanks

I haven't tested this but if the specials price appeared before this change was made, it should work after it is installed since it just changes the attributes section.

 

Jack

Share this post


Link to post
Share on other sites
I would like to show the '+/- XXX' attribute price, instead of the actual price with the attribute.

 

Is that possible? (to allow multiple attribute qty orders)

 

Cheers,

EricK

The instructions mention how to do this.

 

Jack

Share this post


Link to post
Share on other sites

Thanks Jack, I can display only the attribute(s) price in the grid by doing this.

		 if ($products_options['price_prefix'] == '+') {
//		 $price_with_attribute = ($product_info['products_price'] + $products_options['options_values_price']);
	   $price_with_attribute = (+ $products_options['options_values_price']);	   
} else {
//	   $price_with_attribute = ($product_info['products_price'] - $products_options['options_values_price']);
   $price_with_attribute = (- $products_options['options_values_price']);	   	   
   }

However, the attribute(s) price does not get added to the cart, only the product price.

Regards,

Eric

 

PS: I updated application_top.php, and set 'action=add_mult' in product_info.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0