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,361

Results 2,301 to 2,320 of 3,609
17 Sep 2015, 10:52
#2301
corseter avatar

corseter

New Zenner

Join Date:
Jun 2010
Location:
Crossmolina, Ireland
Posts:
55
Plugin Contributions:
0

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

Hi, I'm currently using Zen 1.5.4 and installed the latest version of this software. My problem is that when I select the install script feature nothing happens. I did have to mod the general.php file slightly to get the admin section to work. Is there anything I've missed?

17 Sep 2015, 13:11
#2302
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

corseter:

Hi, I'm currently using Zen 1.5.4 and installed the latest version of this software. My problem is that when I select the install script feature nothing happens. I did have to mod the general.php file slightly to get the admin section to work. Is there anything I've missed?

Latest as obtained from where? Any error logs in your logs directory? Hope I didn't introduce somethng yesterday wheni added some code manually.

17 Sep 2015, 14:23
#2303
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

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

mc12345678:

Latest as obtained from where? Any error logs in your logs directory? Hope I didn't introduce somethng yesterday wheni added some code manually.

I have not done anything with the code yet. I will let you know ASAP

17 Sep 2015, 15:05
#2304
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

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

adb34:

I have not done anything with the code yet. I will let you know ASAP

All done. It now works. Locations of my inserts are

After line 114 - global $db, $resultMmessage; inserted the one line
After line 182 - the rest of the code

Do you want me to send you this file?

17 Sep 2015, 15:17
#2305
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

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

Forgot to say I did not need```php
DELETE IGNORE FROM configuration WHERE configuration_key = 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS';
DELETE IGNORE FROM configuration WHERE configuration_key = 'SBA_ZC_DEFAULT';
DELETE IGNORE FROM configuration WHERE configuration_key = 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK';

17 Sep 2015, 16:02
#2306
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

adb34:

All done. It now works. Locations of my inserts are

After line 114 - global $db, $resultMmessage; inserted the one line
After line 182 - the rest of the code

Do you want me to send you this file?

There was only one chunk of code to be inserted. The first code "group" was to show what to find and then the second code "group" was the code to incorporate and the third was for those that just need to remove and reinstall without ftping to edit the files.

As to receivng the file, can send, but (and not to be taken wrong) it won't expedite things on my side due to limited access to methods of uploading. The change(s) made to the github repo had to be entirely manually typed as copy and paste was not available/allowed by method of accessing it. While able to type quickly, I don't want to introduce errors unnecessarily by way of such manual entrry. This is why I asked about which source corseter used to obtain the files. If I introduced an error into the file then it needs to be fixed.

18 Sep 2015, 15:01
#2307
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

Although no additional information has been provided by any source and I haven't been able to use a computer to observe operation of the plugin, in visual review of the changes made to the install program for ZC 1.5.4, it does appear that I missed the lower case m in $resultMmessage for the three new sections of code. Plugin is updated with that m added for each of the three cases.

@Corseter, could you confirm operation? (Again assuming that the files were downloaded from github for SBA Version 1.5.4)

24 Sep 2015, 16:09
#2308
eyeb avatar

eyeb

New Zenner

Join Date:
Aug 2013
Location:
United States
Posts:
37
Plugin Contributions:
0

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

Hello,

Zen Cart 1.5.4. We sell many 1 only products and when sold there is no backorder. When two people add the same item to their cart the first one to checkout gets the item - BUT the second person can also checkout and pay but there is no more stock to give them. In the normal use of Zen Cart this doesn't happen - it removes the item from the second person's cart before they can checkout (and takes it off the site). However when using Stock by Attribute it leaves the item in the second person's cart and they can still checkout. We want two or more people to add to their carts since not everyone checks out - but once someone buys the item we don't want others to checkout. Is there a fix to this - a change to the code we can do? Or a setting that we've missed? Thanks - cool addon overall.

24 Sep 2015, 16:40
#2309
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

eyeb:

Hello,

Zen Cart 1.5.4. We sell many 1 only products and when sold there is no backorder. When two people add the same item to their cart the first one to checkout gets the item - BUT the second person can also checkout and pay but there is no more stock to give them. In the normal use of Zen Cart this doesn't happen - it removes the item from the second person's cart before they can checkout (and takes it off the site). However when using Stock by Attribute it leaves the item in the second person's cart and they can still checkout. We want two or more people to add to their carts since not everyone checks out - but once someone buys the item we don't want others to checkout. Is there a fix to this - a change to the code we can do? Or a setting that we've missed? Thanks - cool addon overall.

What is the source of the version you have installed and when was it last installed/updated?

24 Sep 2015, 20:05
#2310
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

eyeb:

Hello,

Zen Cart 1.5.4. We sell many 1 only products and when sold there is no backorder. When two people add the same item to their cart the first one to checkout gets the item - BUT the second person can also checkout and pay but there is no more stock to give them. In the normal use of Zen Cart this doesn't happen - it removes the item from the second person's cart before they can checkout (and takes it off the site). However when using Stock by Attribute it leaves the item in the second person's cart and they can still checkout. We want two or more people to add to their carts since not everyone checks out - but once someone buys the item we don't want others to checkout. Is there a fix to this - a change to the code we can do? Or a setting that we've missed? Thanks - cool addon overall.

mc12345678:

What is the source of the version you have installed and when was it last installed/updated?

Took a look at the code during the checkout process, specifically includes/modules/pages/checkout_confirmation/header_php.php and how it relates to SBA 1.5.4, on line 108 (ZC 1.5.2, 1.5.3, and 1.5.4) there is a check that looks like it needs to be modified slightly. This file will get incorporated into the SBA code, but can be easily changed here.

Change:

    if ($stock_check[$i] = zen_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {

to: by adding , $order->products[$i]['attributes'] into the zen_check_stock statement:

    if ($stock_check[$i] = zen_check_stock($order->products[$i]['id'], $order->products[$i]['qty'], $order->products[$i]['attributes'])) {

Without this additional attribute information, then the stock check is made against the base product instead of the SBA tracked quantity. Thus if the product had two attributes each being tracked, if say they both had a quantity of 1, then during the above situation of two people each adding the same attributed product to the cart and "racing" to purchase, well the quantity check would have indicated that there was still one product left, but wouldn't account for having 0 products matching that attribute... With the above, that issue should be resolved.

24 Sep 2015, 21:29
#2311
eyeb avatar

eyeb

New Zenner

Join Date:
Aug 2013
Location:
United States
Posts:
37
Plugin Contributions:
0

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

Thanks so much for the quick reply - I'll look in to this. It was a very recent install - last week or two - Stock By Attribute (SBA) Stock Page Version 1.5.4

24 Sep 2015, 22:11
#2312
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

eyeb:

Thanks so much for the quick reply - I'll look in to this. It was a very recent install - last week or two - Stock By Attribute (SBA) Stock Page Version 1.5.4

Okay, initially I thought that had already been addressed by some other changes and didn't want to spend a long time looking for something that might have already been fixed by other changes. Also I had been following the other thread comparing to base code until mentioned that SBA was a factor. Had an opportunity to logon to a computer and look through the SBA version of the file(s).

Anyways, hopefully you have/find an easy way to test the condition because it's a bit of a special case. :)

26 Sep 2015, 05:48
#2313
muteyaar avatar

muteyaar

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

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

I am using 1.5.4 zencart bversion.

I want to know if this mod can be used to keep stock by attributes for some selected categories only?

I have some categories that need to be stocked by attributes, but most of the categories do not need this mod.

Is this possible that i have the mod usable for selected categories only?

  • muteyaar
26 Sep 2015, 07:31
#2314
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

muteyaar:

I am using 1.5.4 zencart bversion.

I want to know if this mod can be used to keep stock by attributes for some selected categories only?

I have some categories that need to be stocked by attributes, but most of the categories do not need this mod.

Is this possible that i have the mod usable for selected categories only?

  • muteyaar

The way the mod has been rewritten, you can track as much or as little product as desired. If it was entirely installed for one product, then that could be the one product tracked. There is no special only track category x option though... All product setup is centered around the product not the category(ies) in whch it is.

03 Oct 2015, 04:27
#2315
dragon718 avatar

dragon718

New Zenner

Join Date:
Sep 2015
Location:
Washington, DC.
Posts:
16
Plugin Contributions:
0

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

Hello I just installed the stock by attribute module on my site went over everything multiple times to make sure every file was where it is supposed to be went to my admin page and to my surprise BLANK PAGE I need help please running 1.5.4 with latest php my site is https://www.g-linehobbies.com I can not figure out what went wrong

03 Oct 2015, 06:36
#2316
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

Dragon718:

Hello I just installed the stock by attribute module on my site went over everything multiple times to make sure every file was where it is supposed to be went to my admin page and to my surprise BLANK PAGE I need help please running 1.5.4 with latest php my site is https://www.g-linehobbies.com I can not figure out what went wrong

To confirm, please identify which version of SBA was installed and it's source also when you say there was an issue with the admin, do you mean the entire admin area or just the configuration section of SBA on the admin side?

If there is a blank page, there should also be a mydebug log, though it is probably an admin log so if posted please obscure your admin directory.

03 Oct 2015, 16:18
#2317
dragon718 avatar

dragon718

New Zenner

Join Date:
Sep 2015
Location:
Washington, DC.
Posts:
16
Plugin Contributions:
0

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

The Ver. is 1.5.3 was downloaded from the zen-cart plugins page and my admin login page is blank though my site is still up. I do not know how to get to the log files

03 Oct 2015, 16:55
#2318
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

Dragon718:

The Ver. is 1.5.3 was downloaded from the zen-cart plugins page and my admin login page is blank though my site is still up. I do not know how to get to the log files

That version is applcable to ZC 1.5.1. For a version functional wth ZC 1.5.4, please see SBA 1.5.4 for ZC 1.5.3/1.5.4. Can be found at: http://github.com/potteryhouse/stock_by_attribute_1.5.4

The older one can be incorporated to work wth the latest ZC, but care would need to be taken to ensure properly merged...

As for log files, ftp to store, then logs folder.
http://www.zen-cart.com/content.php?124-blank-page

03 Oct 2015, 21:11
#2319
dragon718 avatar

dragon718

New Zenner

Join Date:
Sep 2015
Location:
Washington, DC.
Posts:
16
Plugin Contributions:
0

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

Thank you for response will try advice now

04 Oct 2015, 03:24
#2320
dragon718 avatar

dragon718

New Zenner

Join Date:
Sep 2015
Location:
Washington, DC.
Posts:
16
Plugin Contributions:
0

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

Thank you very much for your support after removing everything I uploaded. I uploaded the newest version everything working fine.