Zen Cart Logo
Forums / All Other Contributions/Addons / Stocks by attributes

Stocks by attributes

Locked

Views: 251,289

Results 681 to 700 of 1,126
This thread is locked. New replies are disabled.
15 Apr 2009, 7:41 AM
#682
laurenjj avatar

laurenjj

New Zenner

Join Date:
Sep 2008
Posts:
80
Plugin Contributions:
0

Re: Stocks by attributes

kuroi:

http://www.zen-cart.com/forum/showpost.php?p=508229&postcount=431

OK now I'm truly perplexed. After going through the various files I thought I figured out that the header_php.php file in the 'checkout shipping' folder had somehow not been updated with your mod. So I then added it and things worked! It wouldn't allow me to checkout if there was an out of stock item in my cart. However...when all items in my basket were in stock, when I clicked to go to the checkout, the page just returned a completely blank header_php page. So I panicked because now I've really screwed things up so I went back and replaced that file with the original one...but it was still returning the blank page. So I panicked more and deleted the header_php all together and now EVERYTHING works??? This is great except that it makes no sense and I'm worried it's going to cause a problem...any idea why this is happening?

15 Apr 2009, 10:51 AM
#683
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

@laurenjj

It is sounding as though key files hadn't over-written your originals and this is why customers were able to checkout even when the attribute stock was at zero. This is far and away the most common installation problem.

I'm afraid that you explanation of the current state of your site cannot be completely accurate, since without the header_php file, the checkout_shipping page simply cannot function, or even exist.

I would suggest a two pronged approach to sort this out.

  1. Re-install the attribute stock module and check each file listed in the readme to ensure that the datestamp confirms that it has been updated (no need to re-run the database patches)

  2. If you still have a blank page problem, then install the debug utility to track down the specific cause.

20 Apr 2009, 4:30 AM
#684
robrem avatar

robrem

New Zenner

Join Date:
Mar 2009
Location:
Taos, NM
Posts:
19
Plugin Contributions:
0

Re: Stocks by attributes

I have installed SBA 4-7 and after some difficulty have got it working fine, I thought, until I tried to add another attribute to a product that was not associated with stock quantity.
I am selling skis and I want to add attributes that will add on a cost for choosing to have the bindings mounted. I created an attribute with the check box style and two values and used absolute prices for them. On my products page only the attribute's name shows up - No values and no check boxes. When I look at the preview from the product attributes controller it shows up correctly.
I have a suspicion that SBA may have something to do with this. Any ideas?
I am using the latest version of ZC.

20 Apr 2009, 5:11 AM
#685
robrem avatar

robrem

New Zenner

Join Date:
Mar 2009
Location:
Taos, NM
Posts:
19
Plugin Contributions:
0

Re: Stocks by attributes

New info on the previous post:
I went into the Products with Attributes Stock console to see what was up there with the product I had tried to add the second set of attributes to and found that the quantity associations I had made to the sizes were gone. When I tried to use the add quantity for product variant the new attribute (which needs no quantity) was there along with the sizes. When I tried to reestablish a quantity to one of the sizes I got this error message:

att: 17,39|38
Warning: Cannot modify header information - headers already sent by (output started at /home/bootdo5/public_html/shopcart/admin/products_with_attributes_stock.php:193) in /home/bootdo5/public_html/shopcart/admin/includes/functions/general.php on line 21

Once you install this mod is it going to require a quantity for any attribute? How do you handle something like sizes + colors?
I'm not sure where to go from here other than removing the second set of attributes until I get an answer on this.

20 Apr 2009, 5:49 AM
#686
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Stocks by attributes

robrem:

I created an attribute with the check box style ...Any ideas?
Just a thought: try changing the check box attribute to a drop down, add stock in PWAS, and see what happens.

20 Apr 2009, 9:59 AM
#687
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

@robrem

From your error message it would appear that you are not using SBA 4.7, but rather the confusingly denoted SBA 4.7 MULTADD. The headers error is well-known and already dealt with in this thread (see post #648 for example).

Going back to you original problem, this cannot be caused by SBA as it has no interaction with the product page (it doesn't kick in until visitors get the the shopping cart), nor does it change the structure of your attributes (it holds stock information in a separate table).

It sounds as though you have an underlying problem with the structure of your attributes, which audradh's suggestion may help you to get to the bottom of.

20 Apr 2009, 3:37 PM
#688
robrem avatar

robrem

New Zenner

Join Date:
Mar 2009
Location:
Taos, NM
Posts:
19
Plugin Contributions:
0

Re: Stocks by attributes

audradh:

Just a thought: try changing the check box attribute to a drop down, add stock in PWAS, and see what happens.

I tried that and the drop down box was there but there were no values in it. I also tried radio buttons and no values or buttons showed there.
Another curious thing occurred while I was trying to add the second attribute, it was altering my overall quantities. When I went into PWAS I found the quantities for my sizes had been duplicated and in some cases triplicated and the overall total increased by those additions. It was not just quantities added to the sizes but the sizes were listed again with quantities associated.

20 Apr 2009, 3:53 PM
#689
robrem avatar

robrem

New Zenner

Join Date:
Mar 2009
Location:
Taos, NM
Posts:
19
Plugin Contributions:
0

Re: Stocks by attributes

kuroi:

@robrem

From your error message it would appear that you are not using SBA 4.7, but rather the confusingly denoted SBA 4.7 MULTADD.

Going back to you original problem, this cannot be caused by SBA

It sounds as though you have an underlying problem with the structure of your attributes, which audradh's suggestion may help you to get to the bottom of.
You're correct - it is the 4.7 MULTADD version. When I downloaded it I thought I was getting the latest update. Is there more that I need to do to fix the version I have other than deleting that line mentioned in post 648?
Would it be better to start over, download and install the right SBA 4.7? If so, would I lose other info related to the products I've created other than the SBA function? Where would I find the correct version?

Re: > It sounds as though you have an underlying problem with the structure of your attributes, Any ideas on how to troubleshoot this?
Thanks for your help.

29 Apr 2009, 6:25 PM
#690
m_and_s avatar

m_and_s

New Zenner

Join Date:
Oct 2006
Posts:
21
Plugin Contributions:
0

Re: Stocks by attributes

krazykev:

Hi Kellan,

I did something very similar but didn't check for null/0 so didn't have to make your second change above.

select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa join " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
on pa.options_values_id = pov.products_options_values_id
join products_with_attributes_stock PWAS
on PWAS.stock_attributes = pa.products_attributes_id
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "'
and PWAS.quantity > 0 " .
$order_by;

This is in attributes.php

Hi Krazykev or anyone that can help me!

I finally had my Stock by attributes 4.7MultiADD worked,
filling all the attributes with values: the solution was to delete the attributes.php file under includes/modules/MY_TEMPLATE.
So now, where should I write the sql query you mention above to solve the other problem?
Should I have another attributes.php somewhere :unsure:.....

Thanks

4 May 2009, 6:31 PM
#691
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

Re: Stocks by attributes

Installed this mod. All files seem to be in the appropriate place but I do not find a new option entitled "Products With Attributes Stock" under Admin -> Catalog
Any ideas as to what i did wrong?

4 May 2009, 7:52 PM
#692
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

Re: Stocks by attributes

flowerchild5:

Installed this mod. All files seem to be in the appropriate place but I do not find a new option entitled "Products With Attributes Stock" under Admin -> Catalog
Any ideas as to what i did wrong?

figured out what i was doing wrong. I had renamed my admin folder therefore the admin files ended up in the wrong place. Just an FYI in case someone else runs into the same problem.

6 May 2009, 5:45 PM
#693
neptun5 avatar

neptun5

New Zenner

Join Date:
Apr 2009
Posts:
10
Plugin Contributions:
0

Re: Stocks by attributes

I have posted my question several times, several different ways, in several different areas. I cannot seem to get anyone to help me. This is the one and only problem that is keeping me from opening shop. Please, please, please help me!

My problem is this...

Right now I have a product with the quantity set at 1. There is an attribute drop down (size) with 7 different possible sizes.

It is letting me add 1 product in each size (or 7 products total) to my cart. However, this is a problem because I can only make 1.

If I try to add the same size 2 times, I do get an error, and it will not add it to the cart.

I have tried this stock by attributes module, but I couldn't get it to perform this function. Is there any way to have attributes that do not alter the product stock?

Thanks in advance for any help or suggestions!

8 May 2009, 3:26 PM
#694
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

@neptun5

I'm afraid that's how Zen Cart works. When a customer adds something to the cart it is still in stock and will remain in stock until somebody actually places an order for it.

Products with different combinations of attributes are deliberately kept separate in the cart so that they don't get confused resulting in the customer receiving (say) two identical items when he or she was expecting them to be different in some way.

Add two identical items to the cart when there's only one in stock and it was tell you. Add two slightly different items and each will be compared individually to the stock available and may pass, even when together they would fail.

OK for 99% of stores, yes. Perfect, no.

Stock by Attributes can't help you with this. The only way to change this would be to go into the shopping cart code and re-program it.

8 May 2009, 3:47 PM
#695
neptun5 avatar

neptun5

New Zenner

Join Date:
Apr 2009
Posts:
10
Plugin Contributions:
0

Re: Stocks by attributes

kuroi~

Thank you so much for your response. It is at least good to know that I am not crazy, and it isn't just doing this to me. If I understand correctly, it will remove the item from stock once the order is fully placed? correct? If this is the case, then it will probably not be an issue most of the time. again, thank you for your response!

natosha

8 May 2009, 3:52 PM
#696
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

neptun5:

kuroi~

Thank you so much for your response. It is at least good to know that I am not crazy, and it isn't just doing this to me. If I understand correctly, it will remove the item from stock once the order is fully placed? correct? If this is the case, then it will probably not be an issue most of the time. again, thank you for your response!

natoshaYou're not crazy, and it's not just you. Although I understood the theory, I did sneak a quick test on a clean install of Zen Cart to make doubly sure and it acted the same there two.

You're right that it won't happen very often, and the stock will be deducted when the order is placed. The most likely case for you I imagine would be where a parent wants to dress two siblings (hopefully of the same gender) the same. In that case you might need to call up and suggest an alternative material. But I guessing that if you had the volume of sales for this to be happening a lot, you'd be one happy lady! :smile:

8 May 2009, 5:06 PM
#697
apricot avatar

apricot

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: Stocks by attributes

I install 4.7 with AJAX and the admin page look messed up any help guys?

19 May 2009, 9:49 AM
#698
jazzyp avatar

jazzyp

New Zenner

Join Date:
Feb 2009
Location:
UK
Posts:
29
Plugin Contributions:
0

Re: Stocks by attributes

xtinexoop:

Am I being stoopid?

Hi

I read the Wiki for this and was looking to add the values to each option - from the archive it suggests a post by grayson to amend

includes/modules/pages/product_info/main_template_vars_attributes.php

well... I can't find that file? has it been superceded... ? or is my install missing it?

Christine

xtinexoop:

Ok - I was being stoopid - the file has been superceded by attributes.php.

Have to say though it has taken me hours to find this out... guess I should have realised when the Wiki pointed to such an old thread.

Christine

I too have just spent two days trying to figure this out. Very frustrating!

19 May 2009, 12:58 PM
#699
colinr avatar

colinr

New Zenner

Join Date:
Jul 2006
Posts:
35
Plugin Contributions:
1

Re: Stocks by attributes

Could this module be modified to provide individual product codes as well as stock levels?

I have tried using the Attributes Modelnumbers contrib by helix, but is (still) in beta and seems very flakey.

ColinR

19 May 2009, 6:13 PM
#700
laurenjj avatar

laurenjj

New Zenner

Join Date:
Sep 2008
Posts:
80
Plugin Contributions:
0

Re: Stocks by attributes

OK..apparently there are more than one thread for SBA and since I'm so deep into this I figured I'd see if perhaps I was in the wrong one...

I don't even know which mod it would refer to but I have a very basic question...

How do you use this mod with a text field???? I ran into a HUGE issue.... what happens when you have a TEXT input field???? For instance. Let's say I have 10 white frames and 4 black frames in stock and both can be engraved. You currently can't even attempt this because it appears this mod turns every option into a dropdown...including text input fields.