Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I have this module and Dynamic Drop Downs installed. The products by Attribute page is not displaying and my host tells me i'm receiving the following server error message:
[FONT="]PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 29624321 bytes) in /var/www/html/admin/products_with_attributes_stock.php on line 524[/FONT]
Any idea how i can increase the memory size?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
DVDTitan
I have this module and Dynamic Drop Downs installed. The products by Attribute page is not displaying and my host tells me i'm receiving the following server error message:
[FONT="]PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 29624321 bytes) in /var/www/html/admin/products_with_attributes_stock.php on line 524[/FONT]
Any idea how i can increase the memory size?
Increasing the memory size isn't the answer. Most likely the code being executed is stuck in a loop and will overflow any memory given. So giving it more will just tie up the server for longer before terminating with an overflow.
This isn't a problem that I've seen before, so I'm guessing that you're using one of the newer versions of the the mod. Unfortunately you haven't said which one ... (hint)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I am using 4.7 version and 1.33 version of Dynamic Dropdowns.
As is ay it has been working fine but there are a lot of products and attributes on my site.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I'm having a cross browser problem... here are some screenshots of what I am experiencing....
In Firefox it looks fine as you can tell...
http://img194.imageshack.us/img194/4853/123zjy.jpg
And as you can see in Internet Explorer it's all screwed up...
http://img7.imageshack.us/img7/6526/234exw.jpg
Any ideas on how to fix this problem???
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Simple solution is to use Firefox...
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
tat2nu
Simple solution is to use Firefox...
yes I know this... but my client doesn't want to use Firefox... why I don't know.. but.. I'm wondering if there is a fix for this cross browsing dilemma..
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I have installed the latest Stock by Attribute Zen Cart™ Version: v1.3.8
Version: 4.7ajax
I installed everything, but for some reason, when i go to the admin section, and go on "Catalog" the "Products with Attributes Stock" is nowhere to be found. I have no clue why, any help?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
It should be under Admin-->catalog
Did you apply the database patch?
Also, you apparently need to grab a missing file from the previous version.
BTW: just what IS the ajax version supposed to do differently? Any one know?
Making Google Checkout aware of Stock by Attributes
With the Stock by Attrib mod installed, Google button allows checkout if not enough stock based on attrib. Here is small patch to fix for Google Checkout:
In googlecheckout/gcheckout.php find:
Code:
// Stock Check
if (STOCK_CHECK == 'true') {
if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
$flagAnyOutOfStock = true;
}
}
Replace this code with:
Code:
// Stock Check - kiddos hack
if (STOCK_CHECK == 'true') {
unset($attributes);
if(is_array($products[$i]['attributes'])){
$attributes = $products[$i]['attributes'];
} else {
$attributes = '';
}
if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes)) {
$flagAnyOutOfStock = true;
}
}
Now "out of stock" in cart because of SBA shortage will show gray-out Google button and proper "out of stock" reason message.
Happy hacking.
Make PayPal Express button Stock by attrib aware
Similar patch for making Pay Pal Express not allow checkout with not enough stock according to SBA.
Edit ipn_main_handler.php and find:
Code:
require('includes/application_top.php');
Just below that, add the following code:
Code:
// Stock Check - kiddo hack
if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
unset($attributes);
if(is_array($products[$i]['attributes'])){
$attributes = $products[$i]['attributes'];
} else {
$attributes = '';
}
if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes)) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
break;
}
}
}
This will not make the yellow button un-active, but will send the customer back to the shopping cart so they can change the cart contents so no out of stock items.
Happy hacking