Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Qty Product Info


Jack_mcs

Recommended Posts

I'm sorry but I don't understand the question. Your best bet might be to install it into a test shop and see if it will 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

  • 1 month later...

Will the contrib help me? ...

 

Am looking for something that will allow me to enter different stock quatities for each attribute... e.g.

 

We sell band merchandise, and the band in question has 5 different sizes per design, we've setup each size as an attribute... We want to be able to say there are ...

 

5 - Small

12 - Medium

0 - Large

2 - X Large

30 - XX Large

 

Is this possible with this contrib ? if not, can anyone suggest a contrib that does do this?

 

Thanks

Link to comment
Share on other sites

It sounds like you are wanting to control the stock of the attributes. In that case, you need to install the QTPro contribution.

 

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

with 2.2rc2a this works good

if we change

 

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

to

 

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

 

***just delete 0

on product_info.php

Edited by daybreakny
Link to comment
Share on other sites

  • 4 weeks later...

Hi

 

I've added this excellent contribution along with the Option Type Feature contribution which allows you to add a text box to the product_info page.

 

The layout looks great but when products are added to the cart the text box are not added if I have the following in the product_info.php page

 

 

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_mult')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

 

If I change the above to

 

<td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">

 

the text box contents are added as an attribute to the cart but the quantity shows as 1 even if it's not, (the price shows correctly for the number of products ordered.

 

As far as I can work out it's down to these bits of code in application_top.php, can anyone help me sort this out as I'm mystified.

 

case 'add_mult' : if (is_array($HTTP_POST_VARS['a'])){
                 reset($HTTP_POST_VARS['quantity']);
           reset($HTTP_POST_VARS['a']);

           $x=0;
           if (is_array($HTTP_POST_VARS['a'])){
            foreach(($HTTP_POST_VARS['a']) as $key => $value){
              $c = array((int)$HTTP_POST_VARS['b'] => (int)$value);        

              if (is_array($HTTP_POST_VARS['quantity'])){
                 $qty = (int)$HTTP_POST_VARS['quantity'][$x];


                 $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], ($c)))+($qty),($c));
                 $x++;

               }
            }
           }
            } else {
            if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                             }
           }
           tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

                        break;

 

and

 

      // customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

You can have a look at http://www.deanforestfayre.co.uk/shop you will need to login to the store using test as the username and test as the password

 

I would really appreciate any help in this, thanks

Link to comment
Share on other sites

  • 2 months later...

A new version has been uploaded. It just fixes a mistake in the included files. The problem only showed up if more than one type of attributes was used.

 

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 tried it on a server with register globals off and it worked fine. If you installed it by copying the files, the application_top.php file might cause that since it is for an MS2 shop. Be sure to use your original file and only copy the applicable changes to it.

 

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

the new upload should have the usable application_top.php file that shoudl NOT need the register_globals off error..It SHOULD.. like i said..

 

i installed the contribution on my website which is using the newest version of oscommerce, and it worked fine... i am VERY VERY happy with this contribution. it works PERFECTLY now.

 

i do have a question. This contribution automatically makes the attribute price the actual price (no +/-) however, i have the attributes sets added and it requires a +/- sign.. is this something that is not working BECAUSE of the attrb. qty contribution?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

ohok.. i musthave missed that. THANKS

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I have installed this contribution with no errors. However I have 3 different options on one product (set up fee, image upload, then this contrib. (price/qty))

 

See them here on my test product page:

http://www.patriotflagstore.com/shop/produ...products_id=144

 

They do not add together in the cart. It's like the first two options get ignored. I noticed in the instructions for this contribution, on step 6 it mentions how to do this, but doesn't give specific instructions or what code to put where to accomplish this. It just says:

 

"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."

 

Can someone provide the code I need to have these 3 options add up?

 

Thank you in advance.

Link to comment
Share on other sites

I have installed this contribution with no errors. However I have 3 different options on one product (set up fee, image upload, then this contrib. (price/qty))

 

See them here on my test product page:

http://www.patriotflagstore.com/shop/produ...products_id=144

 

They do not add together in the cart. It's like the first two options get ignored. I noticed in the instructions for this contribution, on step 6 it mentions how to do this, but doesn't give specific instructions or what code to put where to accomplish this. It just says:

 

"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."

 

Can someone provide the code I need to have these 3 options add up?

 

Thank you in advance.

That was the purpose of the last version. It should work fine no matter the number of option types. That text in the contribution is from the original author and will be removed in the next update. You might want to look at the attributes themselves. Maybe they are not setup correctly in some way?

 

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 don't understand what you mean by SKU in this context but that would be something to do with the basic attribute system. If you can create the attributes as you want them before this is added, it should work afterwards.

 

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 don't understand what you mean by SKU in this context but that would be something to do with the basic attribute system. If you can create the attributes as you want them before this is added, it should work afterwards.

 

Jack

 

Hi Jack

Thank you for the reply. The SKU is the product code. For example, if I have coffee with code 123456 and add attributes:

gift wrapped and fine ground I need to have gift wrapped be code #123654 and fine ground be code # 321456.

Can that be done?

Link to comment
Share on other sites

If the SKU is an extra field, which it sounds like it is, then no section of oscommerce will work with it unless the code is modified. So, no, you can't do that as the code is (assuming standard code). It has nothing to do with this contribution though, it is just how oscommerce works. You would need to edit the attributes code so that it handles the extra field. Once that was done, this contribution will work with it.

 

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

Hi Jack, or any one else

 

Is there a way to arrange the sort order on the attributes. For example. I am using this to list three different sizes with a different price for each. 4 oz is $6.95, 17oz is $24.00, and 34 oz. is $38.00.

 

The problem I am having is that it is listing it with the 34 oz first, then the 17 oz, then the 4 oz. I want it the other way around.

 

Also another issue , not sure if this can be corrected. Because this has three sizes, it my product entry screen, I am leaving the price as $0.00 and the attribute is giving it's price. So now when you select the product it shows the price as $0.00. I know I can't get rid of that on the products page because I have products that don't have Attributes. Any thoughts?

 

Thanks,

Pete

Link to comment
Share on other sites

The sorting problem has to do with the attributes system. You need to install one of the attributes sorter contributions to fix that.

 

For the second, the code would have to be changed to check if the price is 0 to determine whether to show the attirubute or not.

 

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 believe there is a contribution called hide price if product = $0.00

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hi there, lets see...

 

I think this is the contribution I need.

 

I am looking for an attributes contribution that can list my products as in the following link:

 

Categories: http://www.my-cuppa-tea.com/index.php?cPath=100_133

here you can see how one product has two price options depending on size

 

Product Listing: http://www.my-cuppa-tea.com/product_info.p...roducts_id=1166

here attributes are display in a table form and with buy now button

 

Will this contribution help me accomplish that? if not, do you know which one might?

 

thanks a lot!

 

Ricardo

Link to comment
Share on other sites

No, this contribution does not change the product listing. This contribution makes the attributes a table with boxes for quantity so the customers can just order multiple items at one time

 

see my site:

Store catalog

clikc pets then trap falls and you will see it in any product there

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

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...