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: 658,615

Results 2,101 to 2,120 of 3,609
4 Apr 2015, 6:03 PM
#2101
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

xfourninetwox:

Hey guys, there are 101 and one pages in response to this thread so I can't page through all these to find my answer. I am trying to add the SQL patch (I guess?) and can't figure out what is going wrong. I'm trying to upload but keep getting this error:

Error Failed: 4
Error ERROR: Cannot execute because table products_with_attributes_stock does not exist. CHECK PREFIXES!
Error ERROR: Cannot execute because table products_with_attributes_stock does not exist. CHECK PREFIXES!
Error ERROR: Cannot execute because table products_with_attributes_stock does not exist. CHECK PREFIXES!
Error ERROR: Cannot execute because table products_with_attributes_stock does not exist. CHECK PREFIXES!
Warning Note: 4 statements ignored. See "upgrade_exceptions" table for additional details.

I'm using ZC v1.5.1 if that helps...

What SQL patch? Where did you try to use the patch? (Tools->install sql patches or phpmyadmin?)

There is a search feature, to the thread, doesn't require reading 101 plus one pages. May have ZC 1.5.1, but what version of this software are you trying to use? We aren't at your computer/site to be able to see this information, it must be provided. Please help us help you.

4 Apr 2015, 10:45 PM
#2102
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

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

mc12345678:

What SQL patch? Where did you try to use the patch? (Tools->install sql patches or phpmyadmin?)

There is a search feature, to the thread, doesn't require reading 101 plus one pages. May have ZC 1.5.1, but what version of this software are you trying to use? We aren't at your computer/site to be able to see this information, it must be provided. Please help us help you.

I tried to install via Admin/Tools/Install SQL Patch. Which is where I came up with the error message. I just downloaded the "latest version" of the plug-in. I believe it was 1.5.3.

I overwrote all of the other files through my FTP program manually, but when it comes to the SQL patches any other time in the past I have used the admin area to upload and haven't run into any problems. Today I came up with the above error message and am not certain what to do.

4 Apr 2015, 11:08 PM
#2103
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

xfourninetwox:

I tried to install via Admin/Tools/Install SQL Patch. Which is where I came up with the error message. I just downloaded the "latest version" of the plug-in. I believe it was 1.5.3.

I overwrote all of the other files through my FTP program manually, but when it comes to the SQL patches any other time in the past I have used the admin area to upload and haven't run into any problems. Today I came up with the above error message and am not certain what to do.

So, again what sql patch are/were you trying to run, because the installation of this version of SBA (1.5.3) does not have a SQL patch to be run per se.. Installation is through the use of the admin program stock_by_attr_install.php...

4 Apr 2015, 11:16 PM
#2104
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

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

I guess that is what I'm confused about. I thought that running that would be unnecessary if I was trying to add things manually. I guess what I need to know is what do I need to do, or select at admin/stock_by_attr_install.php if I've already manually overwritten the php files? Would it be the Full DB Install, or something else in MYPHP or Install SQL Patch?

4 Apr 2015, 11:40 PM
#2105
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

xfourninetwox:

I guess that is what I'm confused about. I thought that running that would be unnecessary if I was trying to add things manually. I guess what I need to know is what do I need to do, or select at admin/stock_by_attr_install.php if I've already manually overwritten the php files? Would it be the Full DB Install, or something else in MYPHP or Install SQL Patch?

Installation has been made about as easy as it could be possible, copy the files over to the server, then open the stock_by_attr_install.php file. As for which option(s) to choose from there, I would suggest reading the page, evaluating your current systems condition (ie, maybe need the upgrade, though based on your initial post it looks like the SBA of any version isn't in your store's database at this time.) so more than likely would want the full install.. Again though, instructions are provided when going to that address. Please take a moment to read through them, and identify how they could be improved if there is still a question.

5 Apr 2015, 12:16 AM
#2106
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

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

mc12345678:

Installation has been made about as easy as it could be possible, copy the files over to the server, then open the stock_by_attr_install.php file. As for which option(s) to choose from there, I would suggest reading the page, evaluating your current systems condition (ie, maybe need the upgrade, though based on your initial post it looks like the SBA of any version isn't in your store's database at this time.) so more than likely would want the full install.. Again though, instructions are provided when going to that address. Please take a moment to read through them, and identify how they could be improved if there is still a question.

The installation went over with no errors, however the first thing I noticed under the "How To Use Stock Attributes" is you should be able to visit "Catalog / Products with Attributes Stock". I don't see that option in my admin area?

5 Apr 2015, 1:32 AM
#2107
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

xfourninetwox:

The installation went over with no errors, however the first thing I noticed under the "How To Use Stock Attributes" is you should be able to visit "Catalog / Products with Attributes Stock". I don't see that option in my admin area?

Didn't have it after the installation either? Navigate around to at least one other link before viewing the Catalog menu to see if there is an option somewhere in the menu that has at least Product with Attributes Stock in it's button title?

Still having issues?

5 Apr 2015, 1:43 AM
#2108
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

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

Yeah, I noticed the new options for SBA under Configuration / Stock, but nothing else. I even tried doing the additional optional SQL patch, because I already have products with attributes, but I'm not seeing anything. Is there something that possibly needs to be overwritten in more than one place, like for example if a "/YOUR_Template/" section didn't pick up?

5 Apr 2015, 4:51 AM
#2109
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

xfourninetwox:

Yeah, I noticed the new options for SBA under Configuration / Stock, but nothing else. I even tried doing the additional optional SQL patch, because I already have products with attributes, but I'm not seeing anything. Is there something that possibly needs to be overwritten in more than one place, like for example if a "/YOUR_Template/" section didn't pick up?

A standard install ought to provide the Products With Attributes Stock (aka SBA) menu option to the catalog menu dropdown.

Perhaps need to remove it through the same install script option... Might suggest running the removal at least twice, then do the full install...

There are some YOUR_TEMPLATE related files where the files within need to be placed in the directory of the current template; however, the admin side is not affected by the YOUR_TEMPLATE aspect provided the files in the admin directory have been brought into the renamed admin directory.

7 Apr 2015, 5:47 AM
#2110
edvon avatar

edvon

New Zenner

Join Date:
Aug 2009
Posts:
26
Plugin Contributions:
0

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

Hi,
I installed a version of zc 1.5.4 and the SBA version 1.5.4 I downloaded from https://github.com/potteryhouse

Not sure if someone got this combination working. I am a little confused about the dynamic drop downs that are supposed to be implemented in this version of SBA, I don't get a "Enable Dynamic Dropdowns" in Admin.

The variants seem to work, only that I get multiple shows of the second attribute name:
i.e. I have two sizes 34 and 35 and three colours. Black, White, Red

On the product page I get size 34 and 35 on top, but the colours show up multiple (one colour for each size) Am I doing something wrong or is this just not working yet?

thanks, ed

Attachment #15140

7 Apr 2015, 10:38 AM
#2111
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Yes that was an issue with the version on the main branch. Try https://github.com/potteryhouse/stock_by_attribute_1.5.4/tree/mc12345678_ZC154 which is compatible with both zc 1.5.3 and ZC 1.5.4 as a single download with improvements to handle/address multiple attributes.

7 Apr 2015, 10:50 AM
#2112
edvon avatar

edvon

New Zenner

Join Date:
Aug 2009
Posts:
26
Plugin Contributions:
0

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

mc12345678:

Yes that was an issue with the version on the main branch. Try https://github.com/potteryhouse/stock_by_attribute_1.5.4/tree/mc12345678_ZC154 which is compatible with both zc 1.5.3 and ZC 1.5.4 as a single download with improvements to handle/address multiple attributes.

Thanks! I'll try that one.
ed

8 Apr 2015, 3:35 PM
#2113
pompidompie avatar

pompidompie

Zen Follower

Join Date:
Mar 2015
Posts:
105
Plugin Contributions:
0

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

I would like to ask a question.

I have zencart 1.5.4
Some of my products are made with the same things. The customer can choose from 12 colors. This means that if 1 color is sold out, it is sold out for all these products.
With this add on, can i eather display that color as temperarly not available, or that the color can not be chosen, or...?
Can i do this with this add on?

8 Apr 2015, 3:41 PM
#2114
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

Pompidompie:

I would like to ask a question.

I have zencart 1.5.4
Some of my products are made with the same things. The customer can choose from 12 colors. This means that if 1 color is sold out, it is sold out for all these products.
With this add on, can i eather display that color as temperarly not available, or that the color can not be chosen, or...?
Can i do this with this add on?

Correct, this will allow you take mark that color as Out of Stock or any other language you'd like to use.

8 Apr 2015, 3:47 PM
#2115
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

jeking:

Correct, this will allow you take mark that color as Out of Stock or any other language you'd like to use.

To add, if not mistaken for single attributes like described to hide the options that are out-of-stock.

9 Apr 2015, 2:33 AM
#2116
batracy avatar

batracy

New Zenner

Join Date:
Jun 2012
Posts:
57
Plugin Contributions:
1

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

Ok, I've been merging files into and for zen cart v1.5.4 and for the most part it is pretty straight forward. However, there is one file that really has me puzzled. The admin/includes/classes/order.php file that is part of this plugin is no where near similar in any respects to the same file in zen cart v1.5.4! The zen cart version is a much bigger file in size (over 4 times the amount of code), which has left me wondering what do I do now?

I'm upgrading my store to zen cart v1.5.4 for the latest in security upgrades (good to stay current), and all other plugins I use have merged right in without much difficulty. This one though, which I rely on heavily in my store, has me frustrated and not sure what to do. Does any one have any thoughts or suggestions on a course of action I can take? I can usually find my way around in code pretty well and get things working, but this particular problem kinda has me stumped. Any help would be much appreciated.

Thanks!

9 Apr 2015, 2:48 AM
#2117
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

batracy:

Ok, I've been merging files into and for zen cart v1.5.4 and for the most part it is pretty straight forward. However, there is one file that really has me puzzled. The admin/includes/classes/order.php file that is part of this plugin is no where near similar in any respects to the same file in zen cart v1.5.4! The zen cart version is a much bigger file in size (over 4 times the amount of code), which has left me wondering what do I do now?

I'm upgrading my store to zen cart v1.5.4 for the latest in security upgrades (good to stay current), and all other plugins I use have merged right in without much difficulty. This one though, which I rely on heavily in my store, has me frustrated and not sure what to do. Does any one have any thoughts or suggestions on a course of action I can take? I can usually find my way around in code pretty well and get things working, but this particular problem kinda has me stumped. Any help would be much appreciated.

Thanks!

Can you confirm what version of SBA you are using?

9 Apr 2015, 2:48 AM
#2118
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

batracy:

Ok, I've been merging files into and for zen cart v1.5.4 and for the most part it is pretty straight forward. However, there is one file that really has me puzzled. The admin/includes/classes/order.php file that is part of this plugin is no where near similar in any respects to the same file in zen cart v1.5.4! The zen cart version is a much bigger file in size (over 4 times the amount of code), which has left me wondering what do I do now?

I'm upgrading my store to zen cart v1.5.4 for the latest in security upgrades (good to stay current), and all other plugins I use have merged right in without much difficulty. This one though, which I rely on heavily in my store, has me frustrated and not sure what to do. Does any one have any thoughts or suggestions on a course of action I can take? I can usually find my way around in code pretty well and get things working, but this particular problem kinda has me stumped. Any help would be much appreciated.

Thanks!

Not sure which branch you have downloaded, but the admin/includes/classes/order.php file in the mc12345678_zc154 branch has basically two changes as compared to the ZC 1.5.4 version, which increases the size only slightly. Hopefully files are being compared one for one and not comparing say an admin file against a storeside file.
Changes highlighted below are entered into the sql that begins around line 157.

        // START "Stock by Attributes" added to array products_options_values_id and 'value_id' => $attributes->fields['products_options_values_id'],
        $attributes = $db->Execute("select products_options, products_options_values, options_values_price,
                                           price_prefix, [B]products_options_values_id,[/B]
                                           product_attribute_is_free
                                    from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . "
                                    where orders_id = '" . (int)$order_id . "'
                                    and orders_products_id = '" . (int)$orders_products->fields['orders_products_id'] . "'");
        if ($attributes->RecordCount()>0) {
          while (!$attributes->EOF) {
            $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
                                                                     'value' => $attributes->fields['products_options_values'],
                                                                     [B]'value_id' => $attributes->fields['products_options_values_id'],[/B]
                                                                     'prefix' => $attributes->fields['price_prefix'],
                                                                     'price' => $attributes->fields['options_values_price'],
                                                                     'product_attribute_is_free' =>$attributes->fields['product_attribute_is_free']);
            // END "Stock by Attributes"

That's the only (functional) change made to this file... Should be a snap to "merge".

9 Apr 2015, 2:59 AM
#2119
batracy avatar

batracy

New Zenner

Join Date:
Jun 2012
Posts:
57
Plugin Contributions:
1

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

I've downloaded the latest from the Stock by Attributes thread. Is this not the right one?

When I looked at the code, I did see the two places you highlighted, but what really gave me pause was the drastically different file sizes.

9 Apr 2015, 3:08 AM
#2120
batracy avatar

batracy

New Zenner

Join Date:
Jun 2012
Posts:
57
Plugin Contributions:
1

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

I think I see where the problem is. I've just checked the file sizes and content of the admin/includes/classes/order.php and the includes/classes/order.php file and it seems they are reversed on my test install. This was supposed to be a clean install from BlueHost, and now I'm wondering what else could possibly be wrong - although the test store does seem to be working with out any problems - although I haven't created an order yet ;-)