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

Results 681 to 700 of 3,609
4 Jun 2009, 8:47 AM
#681
kuroi avatar

kuroi

Totally Zenned

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

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

swamyg1:

I did this but it's still not working right. I set the stock to 10000 on the product level, the add to cart button displays fine but no attributes are displayed at all. Here's a linkVanilla Stock by attributes plays no part in displaying attributes. It only gets involved when a customer adds a product with stock attributes to their cart, and so can't cause them not to be displayed on the product page.

Also, when I follow the link you gave, the page says that the product couldn't be found. This too is not something that stock by attributes could cause.

Nice site though. :yes:

4 Jun 2009, 12:51 PM
#682
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

kuroi:

Vanilla Stock by attributes plays no part in displaying attributes. It only gets involved when a customer adds a product with stock attributes to their cart, and so can't cause them not to be displayed on the product page.

Also, when I follow the link you gave, the page says that the product couldn't be found. This too is not something that stock by attributes could cause.

Nice site though. :yes:

Ahh I see. So I do have to stock lots and lots of quantities for each attribute for these products to ensure they never go out of stock. Not a big deal, I'll just go ahead and do that.

Thanks for the help, and positive comments on the site:smile:

4 Jun 2009, 2:33 PM
#683
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

kuroi:

Vanilla Stock by attributes plays no part in displaying attributes. It only gets involved when a customer adds a product with stock attributes to their cart, and so can't cause them not to be displayed on the product page.

Also, when I follow the link you gave, the page says that the product couldn't be found. This too is not something that stock by attributes could cause.

Nice site though. :yes:

This is now working, but since I have a large set of attributes for this product it seems like the query is taking a pretty big hit on performance. Takes quite a few seconds to load the product.

Is there any way to not check the attribute stock and allow the attributes to display and checkout for particular products.

Can anybody think of a better way to do this?

4 Jun 2009, 8:37 PM
#684
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

swamyg1:

Ahh I see. So I do have to stock lots and lots of quantities for each attribute for these products to ensure they never go out of stock. Not a big deal, I'll just go ahead and do that.If you don't want the products to ever be treated as stock and can just put in (presumably) arbitrary large numbers to prevent that, why bother recording and checking stock at all? Unless I'm missing something, it sounds like a lot of grief with no real benefit.

4 Jun 2009, 8:40 PM
#685
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

swamyg1:

This is now working, but since I have a large set of attributes for this product it seems like the query is taking a pretty big hit on performance. Takes quite a few seconds to load the product.

Is there any way to not check the attribute stock and allow the attributes to display and checkout for particular products.

Can anybody think of a better way to do this?Unless you have made changes to it (e.g. to display attribute stock on the product page), stock by attributes doesn't get involved in the product page at all. So turning it off won't deal with any problems related to the slowness of that page. Normal Zen cart attributes can cause this if the number or complexity is high. I suspect that might be what you're experiencing.

5 Jun 2009, 12:05 AM
#686
gezuvor avatar

gezuvor

New Zenner

Join Date:
Apr 2007
Location:
Orange County, CA
Posts:
88
Plugin Contributions:
2

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

I am also having the problem of adding user-edited text attributes to a product that was addressed back on pg. 65. Does anyone know how to do this? I have the the attribute created, but it is not available...

5 Jun 2009, 3:04 AM
#687
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

kuroi:

If you don't want the products to ever be treated as stock and can just put in (presumably) arbitrary large numbers to prevent that, why bother recording and checking stock at all? Unless I'm missing something, it sounds like a lot of grief with no real benefit.

I only want to do this for products within ONE of my categories (called "custom order") All the other product and attribute combinations need to have stock attributes enabled.

I have modified stock by attributes with the dynamic dropdown mod so only options that have stock are displayed in the dropdowns. We sometimes have many attributes that are not in stock (ie. we carry 8" to 36" lengths for a product in various colors, sometimes we are out of stock of various combinations.)

I hope this explains what I'm trying to do, I just want people to select from the many many attribute combinations for "custom order" products and CHECKOUT even if the items are not in stock for this particular "custom order" product.

5 Jun 2009, 6:47 AM
#688
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

I figured out how to do this, it requires creating a new product type. This involves modifying the db, duplicating a number of files in admin and catalog, along with calling the original tpl_modules_attributes instead of the modified version I am using for my other products... therefore no stock check!

If anybody needs to create a product type documentation is here:
https://www.zen-cart.com/tutorials/index.php?article=114

Here's a good walk through for the not so savvy programmer type:
http://support.smallbusinesspages.org/zen-cart-custom-product-types/chapter-1-backing-up.html

My situation might be different because I'm using stock by attributes with the dynamic dropdown mod. Hope it helps!

10 Jun 2009, 2:16 PM
#689
spyke26 avatar

spyke26

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

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

Hello,

I just installed "products_with_attributes_stock_4.7.ajax" and I have a problem :

When a customer order a product whith an attribute, the quantity of the product is -1, but the quantity of the attribute is NOT modify.

Ex : t-shrit red
Quantity : tshirt : 10
- red : 4
- blue : 6
After the purchase :
Quantity : tshirt : 9
- red : 4
- blue : 6

Could you help me please ?
Thanks,

10 Jun 2009, 4:34 PM
#690
spyke26 avatar

spyke26

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

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

Sorry, I just found my answer ... :


Sorry I didnt realise there were different versions.
I am using the AJAX one.

I just double checked the uploaded AJAX one from the server, there is definately NO includes/classes/order.php

I downloaded the Multiadd version, there IS an includes/classes/order.php

I just copied just the order.php over, and it worked fine after that.

12 Jun 2009, 9:09 AM
#691
dvdtitan avatar

dvdtitan

New Zenner

Join Date:
Apr 2007
Posts:
87
Plugin Contributions:
0

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

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:

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

Any idea how i can increase the memory size?

12 Jun 2009, 9:27 AM
#692
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

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:

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

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)

13 Jun 2009, 5:51 AM
#693
dvdtitan avatar

dvdtitan

New Zenner

Join Date:
Apr 2007
Posts:
87
Plugin Contributions:
0

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

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.

20 Jun 2009, 6:59 PM
#694
johndiaz avatar

johndiaz

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

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

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...

And as you can see in Internet Explorer it's all screwed up...

Any ideas on how to fix this problem???

21 Jun 2009, 2:31 AM
#695
tat2nu avatar

tat2nu

Zen Follower

Join Date:
Jan 2005
Posts:
178
Plugin Contributions:
0

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

Simple solution is to use Firefox...

21 Jun 2009, 3:38 AM
#696
johndiaz avatar

johndiaz

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

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

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..

23 Jun 2009, 7:35 PM
#697
elverdugo0 avatar

elverdugo0

New Zenner

Join Date:
May 2009
Posts:
19
Plugin Contributions:
0

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

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?

10 Jul 2009, 7:45 AM
#698
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

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

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?

10 Jul 2009, 8:03 AM
#699
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

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

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:

// Stock Check
  if (STOCK_CHECK == 'true') {
    if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
      $flagAnyOutOfStock = true;
    }
  }

Replace this code with:

// 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.

10 Jul 2009, 8:19 AM
#700
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

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

Similar patch for making Pay Pal Express not allow checkout with not enough stock according to SBA.

Edit ipn_main_handler.php and find:

require('includes/application_top.php');

Just below that, add the following 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