Re: 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?
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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?
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Forgot to say I did not need
PHP Code:
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';
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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.
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)
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.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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?
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
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.
Quote:
Originally Posted by
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:
Code:
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:
Code:
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.