Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Qty Product Info


Jack_mcs

Recommended Posts

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

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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,

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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!

Link to comment
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.

Link to comment
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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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.

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 4 weeks later...
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

Link to comment
Share on other sites

  • 1 month later...

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?

Sincerely

Mike

Link to comment
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

Link to comment
Share on other sites

  • 5 weeks later...

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

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...