Jump to content



Latest News: (loading..)

* * * * * 1 votes

Attribute Qty Product Info


  • Please log in to reply
177 replies to this topic

#161   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 09 January 2010 - 12:24 PM

Have you setup attributes in admin?

#162   Ariffshah

Ariffshah
  • Members
  • 67 posts
  • Real Name:Noor Ariffshah
  • Gender:Male
  • Location:Kuala Lumpur

Posted 13 January 2010 - 06:55 PM

View PostJack_mcs, on 09 January 2010 - 12:24 PM, said:

Have you setup attributes in admin?

Jack, a bit busy with real work last few days. Found the solution. Actually it is because of my broadband as when i am trying to upload the script, it hang haft way. That is why there is no changes in my admin side.

I am sorry for the trouble and thank you for answering my question.

Best regards.

#163   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 13 January 2010 - 07:11 PM

You're welcome. Glad you figured it out.

#164   superness

superness
  • Members
  • 12 posts
  • Real Name:Ness

Posted 18 February 2010 - 09:20 AM

View Postcharinlasvegas, on 17 January 2009 - 02:52 PM, said:

Exactly.

Here on this page see what I mean, add 1 to your cart.  It will give you 3, because it comes in 3 colors.

If you go here, & add 1 to your cart, you will get 2 - that items has 2 colors.

Every item that uses color or size options is doing that.

It was working ok, now all of a sudden it's not.  I'm completely stumped as to what happened.

I am also having this kind of problem in my attributes. For example, I have one product with three attributes (att 1, att 2 and att 3). If I try to enter 3 quantity in att 2, att 1 and 3 will also be added in my shopping cart with 1 quantity. so a total of 5 quantities will be shown in my cart.  I hope someone can help me with this one.


View Postlindsayanng, on 15 January 2009 - 02:34 AM, said:

ohh.. yea, you will have to change the prices of all of the attributes.. unfortunately.

You can see it work here
Product Info Page

I visited your site and tried to add 1 quantity for one of your attributes and noticed that the only attribute being added to the shopping cart is the one where i entered a quantity. how did you do this?  can you share your code with me so that i can see where i have gone wrong.

thanks.

#165   Bramp

Bramp
  • Members
  • 23 posts
  • Real Name:Kel

Posted 18 February 2010 - 10:31 PM

Is it possible for this contribution to be modified in some way so that instead of listing all the attributes with a quantity box next to them, it will still have the dropdown box next to it but with the addition of a quantity box, like this;

Attribute option 1 [dropdown options] [Qty box]
Attribute option 2 [dropdown options] [Qty box]
Attribute option 3 [dropdown options] [Qty box]
Attribute option 4 [dropdown options] [Qty box]

Can anyone help me with this, I am a newbie to coding / PHP so I don't know how to modify things but this contribution is almost exactly what I need but with the addition of the original dropdown box.

Thanks  :)

#166   superness

superness
  • Members
  • 12 posts
  • Real Name:Ness

Posted 22 February 2010 - 05:27 PM

View Postsuperness, on 18 February 2010 - 09:20 AM, said:

I am also having this kind of problem in my attributes. For example, I have one product with three attributes (att 1, att 2 and att 3). If I try to enter 3 quantity in att 2, att 1 and 3 will also be added in my shopping cart with 1 quantity. so a total of 5 quantities will be shown in my cart.  I hope someone can help me with this one.




I visited your site and tried to add 1 quantity for one of your attributes and noticed that the only attribute being added to the shopping cart is the one where i entered a quantity. how did you do this?  can you share your code with me so that i can see where i have gone wrong.

thanks.

i hope someone can help me with this problem

#167   edjudge

edjudge
  • Members
  • 2 posts
  • Real Name:Edward Judge

Posted 18 March 2010 - 05:16 PM

I am trying to implement this on my website. For the products that I am selling people need to be able to chose a size, colour, and model. Unfortunately I can only make it create one long list.

This is what it looks like on my site but ideally this is the end result Tthat I was looking for however would settle for something simpler without the "in stock" option.

Any help you could offer would be amazing!
Ed

#168   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 18 March 2010 - 05:22 PM

It looks like the attributes are being created as you want and their formatting just needs to be changed. That is just a matter of changing the display code on the product page but it is something you have to figure out yourself or pay someone to do since it is specific to your shop.

#169   edjudge

edjudge
  • Members
  • 2 posts
  • Real Name:Edward Judge

Posted 19 March 2010 - 02:49 PM

Thanks for that, but just one thing. On the info.txt file that comes with the download there is the following:

6. Currently working with just one attribute option type (ex. size or color; not both).  Had no need to edit
   it but if you want just make:
      tep_draw_hidden_field('b[]',$products_options_name['products_options_id'])  in the product_info.php an array ;
      then add another while or for loop in the application_top.php and it should work.


I'm pretty new to php coding and was wondering exactly whay I should be adding/changing to make it comply with this.

Thanks in advance

#170   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 19 March 2010 - 03:20 PM

View Postedjudge, on 19 March 2010 - 02:49 PM, said:

Thanks for that, but just one thing. On the info.txt file that comes with the download there is the following:

6. Currently working with just one attribute option type (ex. size or color; not both).  Had no need to edit
   it but if you want just make:
      tep_draw_hidden_field('b[]',$products_options_name['products_options_id'])  in the product_info.php an array ;
      then add another while or for loop in the application_top.php and it should work.
I don't know what that refers to. I didn't write it. But when I try it here, all of the attributes are showing as expected.

#171   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 28 March 2010 - 07:48 PM

View PostLgn.Magic, on 11 September 2009 - 04:50 PM, said:

Jack,

i've tried to add this contribution on a fresh install of oscommerce, and special price is not working in attribut table. It just show the standard price, not special.



View PostJack_mcs, on 11 September 2009 - 05:52 PM, said:

I just tested it and you are correct. Funny that no one has noticed that before. I don't have a quick fix for it though but I will add it the list for the changes to the next update.

Jack

Hello Jack,

After sometimes gone, i've decided to give another shot to that prob and see if i can find a solution myself.

Actually i've come across "a partial solution"

I can now have the specials price show correctly in the table of this contribution, but i still have a problem with else/if when writing the last part for the non specials prices.

I explain a bit better. actually this is what i've for showing special price correctly.

I changed
			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']);
	   }

to

			if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
			if ($products_options['price_prefix'] == '+') {
		   $price_with_attribute = ($new_price + $products_options['options_values_price']);
	} else {
		   $price_with_attribute = ($new_price - $products_options['options_values_price']);
			}
			 }

That way any special price is showing correctly. But there is code missing wich get the non specials price and this is there i've the problem. If i code something like


			if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
			if ($products_options['price_prefix'] == '+') {
		   $price_with_attribute = ($new_price + $products_options['options_values_price']);
	} else {
		   $price_with_attribute = ($new_price - $products_options['options_values_price']);
		} else {
		   $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']);
			}
			 }
			  }
			 

or any other way, like changing order like

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

or some other i've tried, i always end with a syntax error on the second or third } else {
I believe error is not big and it shouldn't be hard...im just not good enough to understand wich caractere or word is badly formatted or what is missing.
Also such code "i written" is probably pretty badly written for a php coder wich know exactly what he is doing.

But if u have any suggestion to write second part, i ll take it.

Right now i can make works specials price wich is only the first part of code (first two $price_with_attribute =), but after thatanything i try else get syntax error on else or show me normal price with 0. so i must have mistake somewhere.

i've advanced some on this issue, so i thought i may send something here, and u may be able to give some suggestion

Thank you for your time
Fabien

Edited by Lgn.Magic, 28 March 2010 - 07:58 PM.


#172   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 29 March 2010 - 12:20 AM

Try this. Find
		 if ($products_options['price_prefix'] == '+') {
Add before it
			$new_price =  tep_get_products_special_price($product_info['products_id']);
			$product_info['products_price'] = ($new_price > 0) ? $new_price : $product_info['products_price'];   


#173   Lgn.Magic

Lgn.Magic
  • Members
  • 49 posts
  • Real Name:Fabien

Posted 29 March 2010 - 03:02 PM

Hello Jack,

As always, fast and smart!! The piece of code you posted is working like a charm. Both specials and normal prices are now displaying correctly in the table.

Double check me on a fresh install to make sure it's working, if you're going to post the change on the contributions sections since i've a heavily moded store.

Thank you again for your time and work. you're THE man :)

Regards, Fabien.

#174   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 29 March 2010 - 03:05 PM

You're welcome. I'm glad it worked.

#175   HuskyDog

HuskyDog
  • Members
  • 34 posts
  • Real Name:Ian Beadle

Posted 26 November 2011 - 02:47 AM

Hi Jack,
In 2.3.1, the only thing that shows are "Option Model Price Quantity", but no actual options/checkboxes. Do you know what needs changing to get this to work on 2.3.1, as this is such a really useful contribution, and it would really help me  out (and many others too I think) to get this working.

Many thanks,
Ian

#176   campebass

campebass
  • Members
  • 2 posts
  • Real Name:juan carlos

Posted 06 August 2012 - 08:36 PM

Hello

I am Spanish so my English is not very good hehe.

I put my question or my problem:

Anyway, I installed this contribution on my website, and all good until I fixed it by putting a number in an attribute with a different price than the product, when I look in the cart I just added the original price product and not the price of the attribute.

You can understand me?

version:oscommerce-2.2rc2a

Greetings and thanks

Edited by campebass, 06 August 2012 - 08:37 PM.


#177   Jack_mcs

Jack_mcs
  • Members
  • 25,303 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 06 August 2012 - 10:15 PM

View Postcampebass, on 06 August 2012 - 08:36 PM, said:

Anyway, I installed this contribution on my website, and all good until I fixed it by putting a number in an attribute with a different price than the product, when I look in the cart I just added the original price product and not the price of the attribute.
You must have missed something in one of the changes. You can try using the included files to see if it works and then troubleshoot from there.

#178   campebass

campebass
  • Members
  • 2 posts
  • Real Name:juan carlos

Posted 07 August 2012 - 12:35 PM

Hi

I've tried a thousand ways and no way.

You know that file can be?

I've been looking and may be the one located in includes / classes / shopping_cart.php but much to change variables and functions or not.

Replied greetings and thanks for