Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 660,203

Results 61 to 80 of 3,609
24 Nov 2006, 8:52 PM
#61
lemuria avatar

lemuria

New Zenner

Join Date:
Aug 2005
Posts:
59
Plugin Contributions:
0

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

I have a hypothesis however, about your problem. What version of MySQL are you running?

It's 5.0.18, on Dreamhost.

It would be great to hear any ideas, I'm stuck on this one! If this problem is unrelated to the add-on and there's a better forum for it, please let me know.

26 Nov 2006, 11:20 AM
#62
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

lemuria:

It's 5.0.18, on Dreamhost.

It would be great to hear any ideas, I'm stuck on this one! If this problem is unrelated to the add-on and there's a better forum for it, please let me know.I suspected that you would say something like this. I believe that the specific insert that is failing starts in line 242 of the admin/attributes_controller.php script. The comment immediately above this line says "TODO: MySQL5", suggesting that this insert may need tweaking for MySQL5 compatibility. That said, I've not seen this problem in my MySQL5 environments (and I have dozens).

Are you seeing this on a clean database? Or on a copy of your client's database? If the latter, has your client's database been upgraded from 1.2? If so, could you post a copy of the product_attributes table schema?

26 Nov 2006, 5:48 PM
#63
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Hi,
I downloaded the 4.3 version that is currently in the downloads section. I ran the sql patch and uploaded the files. I went to admin and logged in. I could not find the catalog->products with attributes link. I went back to make sure that all files had downloaded. Well, I noticed that admin/includes/boxes/extra_boxes/products_with_attributes_catalog_dhtml.php had not been uploaded to my server. So, I went to my local folder and noticed that the file was actually named products_with_attributes_catalog_dhtml.ph and not products_with_attributes_catalog_dhtml.php . I'm assuming that this has something to do with the length of the file name, but I'm not sure how to fix it. Does anyone know how I can correct this?
Thanks,
Melissa
http://store.equineshop.biz

26 Nov 2006, 7:52 PM
#64
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

After further analysis, there are other filnames that have bee shortened as well. In my local environment, I'm using Windows XP.
If anyone could help me figure this out, I'd really appreciate it.
Melissa
http://store.equineshop.biz

26 Nov 2006, 8:02 PM
#65
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

saddlebred:

After further analysis, there are other filnames that have bee shortened as well. In my local environment, I'm using Windows XP.
If anyone could help me figure this out, I'd really appreciate it.
Melissa
http://store.equineshop.biz
Windows XP has a full path name limit of 255 characters. Are your Zen Cart files buried deep in a directory structure? If so, I'd recommend moving them closer to your hard disk's root directory.

26 Nov 2006, 10:19 PM
#66
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Thanks that helps a lot. Now things seem to be working right.
Thanks,
Melissa
http://store.equineshop.biz

26 Nov 2006, 10:31 PM
#67
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Ooops! I spoke too soon I am getting the following error when I access http://store.equineshop.biz .
Parse error: syntax error, unexpected '*' in /home/xxxxxxxxxxxxx/public_html/store/includes/functions/functions_lookups.php
on line 174
Any ideas?
Thanks,
Melissa
http://store.equineshop.biz

26 Nov 2006, 11:47 PM
#68
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Here is the offending line of code. It actually appears to be on line 175.
function zen_get_products_stock($products_id, $attributes = '') {
I'm not very familiar with php, so am not sure how to fix it.
Thanks,
Melissa
http://store.equineshop.biz

27 Nov 2006, 12:18 AM
#69
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

saddlebred:

Here is the offending line of code. It actually appears to be on line 175.
function zen_get_products_stock($products_id, $attributes = '') {
I'm not very familiar with php, so am not sure how to fix it.
Thanks,
Melissa
http://store.equineshop.bizYou appear to have been unlucky and downloaded version 4.3 for during the rather brief period when it was the latest version. That honour is now held by version 4.3.1 which contains the fix to the specific problem that you have raised. However you don't need to download the new version , just deleting the contents of line 162 in the file you reference above will fix the problem.

27 Nov 2006, 3:06 AM
#70
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Okay, I've got that fixed. Things seem to be working as expected, accept that the remaining stock doesn't work on products with attributes. I have it set to show the remaining stock in the shopping cart if the customer added more than what is availble. For products without attributes, the amount shows up, but for products without attributes, the number doesn't.
Melissa
http://store.equineshop.biz

28 Nov 2006, 12:32 AM
#71
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

saddlebred:

Okay, I've got that fixed. Things seem to be working as expected, accept that the remaining stock doesn't work on products with attributes. I have it set to show the remaining stock in the shopping cart if the customer added more than what is availble. For products without attributes, the amount shows up, but for products without attributes, the number doesn't.
Melissa
http://store.equineshop.bizSorry, but I'm confused by this post. Visiting your site didn't help as I could see the low stock messages in your shopping cart for products with and without attributes, but could see no stock remaining figures elsewhere, whether the products had attributes or not. Do you have some specific examples?

28 Nov 2006, 1:09 AM
#72
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Okay, I have it set to show the number remaining when the customer adds more than what is available. For my products with attributes, if a customers adds a product to the cart, and the number they add is less than the total stock available, it doesn't show any message, even if there isn't enough stock of the specific variant they chose. For instance, go to http://store.equineshop.biz/index.php?main_page=product_info&cPath=12&products_id=75 and add any color, but red or yellow. Currently we only have 1 red and 1 yellow available. If I add 1 black hat can, it does not show that my stock is low, even though I don't have any black available in black.
Thanks,
Melissa
http://store.equineshop.biz

28 Nov 2006, 3:16 AM
#73
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

saddlebred:

Okay, I have it set to show the number remaining when the customer adds more than what is available. For my products with attributes, if a customers adds a product to the cart, and the number they add is less than the total stock available, it doesn't show any message, even if there isn't enough stock of the specific variant they chose. For instance, go to http://store.equineshop.biz/index.php?main_page=product_info&cPath=12&products_id=75 and add any color, but red or yellow. Currently we only have 1 red and 1 yellow available. If I add 1 black hat can, it does not show that my stock is low, even though I don't have any black available in black.
Thanks,
Melissa
http://store.equineshop.biz

you have set it correctly as if I add 1 black hat can, it does not show low stock but if I enter more than 1 quantity, eg. 2, well the message appear "Products marked with currently back ordered*** are out of stock.
Items not in stock will be placed on backorder." together with the currently available stock! :wacko:

28 Nov 2006, 3:32 AM
#74
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

tajul_ashyqin:

you have set it correctly as if I add 1 black hat can, it does not show low stock but if I enter more than 1 quantity, eg. 2, well the message appear "Products marked with currently back ordered*** are out of stock.
Items not in stock will be placed on backorder." together with the currently available stock! :wacko:
Yes, but there are 0 black hat cans, so if I add 1 it should show that it is currently back ordered and that there is 0 available stock.

28 Nov 2006, 4:46 AM
#75
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Have you defined all the respectives attributes of those stocks?! it should be ok... If the problem still persist, try re-installing it one more time including the SQL patch (remove the old table first!)...

28 Nov 2006, 6:31 AM
#76
lemuria avatar

lemuria

New Zenner

Join Date:
Aug 2005
Posts:
59
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Are you seeing this on a clean database? Or on a copy of your client's database? If the latter, has your client's database been upgraded from 1.2? If so, could you post a copy of the product_attributes table schema?

It's a copy of the client's database, not a clean one, and it has been upgraded to 1.3.6. Here's the table schema, did I export the right part/does it tell you anything?

28 Nov 2006, 9:47 AM
#77
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

lemuria:

It's a copy of the client's database, not a clean one, and it has been upgraded to 1.3.6. Here's the table schema, did I export the right part/does it tell you anything?Yes you exported the right. Yes it tells us something, indeed it gives us most of the answer.

The sixth entry down in this table schema is> options_values_price_w varchar(150) collate latin1_general_ci default '0',That's not a part of base Zen Cart and is most likely left over from an add-on installed on your client's 1.2 Zen Cart. It might be something to do with dual pricing or wholesale pricing. Whatever it is, it's changing the shape of the table so that the product_attributes update no longer "fits". Either you need to locate the add-on that inserted this and find out how it changes product_attributes.php to update the table appropriately, or if the add-on is no longer going to be used, delete this column from the product_attributes table.

28 Nov 2006, 10:35 AM
#78
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

saddlebred:

Yes, but there are 0 black hat cans, so if I add 1 it should show that it is currently back ordered and that there is 0 available stock.Which version of Zen Cart are you using?

When you fixed the earlier problem, did you do so by editing the file, or downloading a new version of the add-on?

29 Nov 2006, 10:22 PM
#80
saddlebred avatar

saddlebred

Inactive

Join Date:
Nov 2006
Posts:
56
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Well, I first tried editing the file. Apparently I did that wrong. I downloaded the new version and uploaded the files. Things still weren't working. I went and deleted the table, overwrote the core zencart files to get things back to the way they were before the install. I then tried to install the sql patch and it gave me an error message saying there were duplicate entries. So, what do I do now. I'm afraid I've really screwed things up.
Melissa
http://store.equineshop.biz