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

Results 441 to 460 of 3,609
12 Jun 2008, 2:49 AM
#441
prs317 avatar

prs317

New Zenner

Join Date:
Jun 2008
Posts:
45
Plugin Contributions:
0

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

I just installed this and tested it on an item. I put a total quantity of 1000, and an attribute with two selections, one with 999 in stock and the other with 1 in stock. It seems I can put 1000 each in the cart without getting an out of stock message...am I doing something wrong?

Thanks!

12 Jun 2008, 6:34 PM
#442
prs317 avatar

prs317

New Zenner

Join Date:
Jun 2008
Posts:
45
Plugin Contributions:
0

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

I uninstalled zen cart and resintalled it and the module and now everything seems peachy. Obviously some error on my part was to blame.

13 Jun 2008, 1:35 AM
#443
fright_rags avatar

fright_rags

Zen Follower

Join Date:
Aug 2005
Posts:
134
Plugin Contributions:
0

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

Ok, I've been using the older version of this mod (4.7 I believe) on my store (1.3.8) and it works fine. However, I just noticed an update to this mod (4.7a) that allows, quote:

"NOTE: This is a simple modification to version 4.7 that allow multiple attribute combinations to be added at the same time."

I installed this mod by overwriting all the files on my server. I also got rid of the file includes/modules/YOUR_TEMPLATE/attributes.php
as it says to do in the instructions when upgrading from previous versions.

However, I do not see how it works any differently than the previous one. How do I add multiple combinations at the same time? Right now I just go to` Catalog> Products With Stock Attributes, find my product, select the attribute and click "Edit Quantity". Then on the next page I modify the quantity and click submit. Where is the difference?

13 Jun 2008, 10:31 PM
#444
xnbsx avatar

xnbsx

New Zenner

Join Date:
Jun 2008
Posts:
2
Plugin Contributions:
0

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

I'm going to try to make this as simple as possible. Try to... haha

I have everything installed and everything works great, but im having three issues.

Ive read thru 90+ pages and havent found a clear cut answer and dont want to spend the time changing every line twenty times till something works (I work full time and this "webstore" is not my full time gig).

I am selling Products that come in many colors.
I have it setup so that on the Product page, there are check boxes for each variation. I need it to stay this way.

Problem 1
If I dont select a checkbox, I can continue the order without anything selected and even check out! Is there a way to only continue if only a check box is selected?

Problem 2
This Product page also serves as a history of the different variations of the product for consumers information. When a product is no longer available, I would like to keep it on the Product page.
Is there a way to eliminate the checkbox for that variation? Or is there a way to have an add to cart on each variation, versus using checkbox's and having one general add to cart?

Problem 3
I have two variations, one with a stock of 4, one with a stock of 0. The stock of 4 works great and doesnt allow someone to check out with more than 4, but the one with zero, even though it gives the warning message, it will let you checkout with an order.

Thanks in advance everyone.

This site has helped me out sooooo much!

16 Jun 2008, 11:01 PM
#445
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

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

I have just updated my stock by attributes to the multi add version.

I am not a programmer and had been looking for something like this to save time so this is great.

I have one small requirement which I hope would improve it for every one and I am sure it would be simple to do but I am not a programmer

I use the word: "please select" as an 'attribute' as the default and I use the feature that this is for display purposes only. However when using this mod to add all varients it pulls in this attribute so I end up with a field/product in the stockby attriibutes list which is irrelevant - eg a product combo of "please select, please select" and then a product combo of: "please select, 0-6 months".

Can this be avoided. I am sure that if the flag for display purposes only is used in the sql statement it would be able to avoid this (on a t-shirt set with colour and size choices it gave me 25 irelevant combinations for example.)

I hope this is possible and would benefit others I am sorry I don't have the skills to do it my self and provide it for the community.

Thanks

MG

23 Jun 2008, 8:32 AM
#446
stevekim avatar

stevekim

New Zenner

Join Date:
Apr 2007
Location:
Los Angeles, CA
Posts:
44
Plugin Contributions:
0

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

kuroi:

Easy Populate's strength is that it takes a single source of data and makes all the connections necessary to split that data between a number of database tables. However, it only knows about the tables in Zen Cart's core code, i.e. knows nothing about the table added for Stock by Attributes.

You could amend Easy Populate to add the code needed to recognize and populate it, but this seems unnecessary to me, since this mod only adds one table. You could therefore separate your attribute stock data off into a separate table, save it as a CSV file and use MySQL's built-in csv import capabilities to upload it directly.

Kuroi,

Thanks for the great mod. I can now stop refunding customers and preventing them from coming back.

However, I have couple of questions since I'm having some difficulty creating query regarding above-quoted message.

How should I match my MS-Access data that does not include Zen-cart's products_id and stock_attributes fields with Zen-Cart's? I'm not in a power to specify neither products_id nor stock_attributes when I created them.

How would you write a query if I could import products_attributes, products and products_options_values tables into my MS-Access DB (or any DB), when I also had, for the convenience, Easy Populate importable table?

26 Jun 2008, 9:21 AM
#447
dzy avatar

dzy

New Zenner

Join Date:
Feb 2005
Posts:
18
Plugin Contributions:
0

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

Hi,

I am using Stock by Attribute mod, which is great because its for a store selling clothing so it obviously needs different sizes. I don't want to show the total amount of stock but the amount of stock of each size and to not show the sizes that are out of stock. How do I do that? I can do PHP editting and some MySQL so if you could tell me how to fetch it/which tables (no phpMyAdmin here) that would be great!

Thanks

27 Jun 2008, 4:08 PM
#448
thehighlandsgroup avatar

thehighlandsgroup

New Zenner

Join Date:
Jul 2007
Location:
Denver, Colorado
Posts:
14
Plugin Contributions:
0

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

I've installed Stock by Attribute Module Version 4.6 and am running ZenCart Version 1.3.7 . After running SQL file. The admin portion of store is running correctly but customers are not able to check out they get the following error upon checkout:

Fatal error: Cannot redeclare class order in /var/www/vhosts/kasmarpro.com/httpdocs/smokejumpers/includes/classes/order.php on line 20

4 Jul 2008, 12:18 AM
#449
whitecliffs avatar

whitecliffs

New Zenner

Join Date:
Dec 2005
Posts:
2
Plugin Contributions:
0

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

Hi,

I have a similar question/s to Dzy.

I am working on a store that sells clothing so it obviously needs different sizes and each size that is in stock will have different stock levels.

  1. Is it possible to use the Stock by Attribute in conjunction with Easy Populate Advanced in some way so that it is possible to mass upload products to Zencart and have the sizing attribute information, including the stock level on hand for each size, uploaded along with the rest of a products information when using Easy Populate Advanced.

I hope I am not missing something obvious, as it seems a little odd to mass upload say 100 or more products just to have to log into the admin back end, and one by one, set up the stock levels for each size for each shirt.

I am also hoping that if it is possible to do this, or if anyone out there is doing this, that someone/they can post a description of what would be required. If MySQL or PHP are required then I should have the necessary skills to make and test modifications. I am just not familiar with the Zen Cart database structure.

  1. Assuming that 1. above is possible. Is it then possible to display the stock level on hand in the shop when on a products page and on the category home page? Or if this is not possible is it possible to stop someone checking out if there is zero stock on hand for a particular sized shirt?

thanks in advance,
Ben

4 Jul 2008, 9:43 PM
#450
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

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

I want to install this Contribution.

Instead of over writing the existing pages what are the codes that need to be over written or inserted?

4 Jul 2008, 10:42 PM
#451
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

adoy:

i have a product with attribute. how do i make it so that it allows checkout even when a certain attribute is out of stock and will just notify the customer that the product will be shipped it 3 weeks.You can allow checkout even when there isn't sufficient stock by setting Admin > Configuration > Stock > Allow Checkout to true.

You can't notify the customer as to when the stock for the particular product and attribute combination will be shipped as your Zen Cart doesn't have this information to communicate.

4 Jul 2008, 10:47 PM
#452
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

xtinexoop:

Have just installed v4.7 and wondering if there is any way of changing the 'Quantity in Cart' so that it changes with the attribute selected, rather than showing the total number of product in the cart.

e.g. at the moment if I add 2 yellow and 1 red item the Quantity in Cart shows 3 whichever attribute I select in the dropdown.

Alternatively is it possible just to remove the Quantity in Cart text and count because it doesn't make sense to me to have "3"Do you mean in the shopping cart? If so, it sounds as though there's a problem with your Zen Cart, as each different combination of attributes should get its own line.

4 Jul 2008, 11:04 PM
#453
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

Tech-E:

I just installed 4.7a on a Zen Cart 1.38a installation. I have an issue to draw to attention to and a question.

The first time I went to set stock quantities on a product with two attribute variations, I accidentally selected Both for the product to select for change. I got a Headers Already Sent error that I traced to admin/products_with_attributes_stock.php, line 193. The following echo statement generates the error.

echo "att: $attributes<bR>\n";

> The line generated output that displays "att: 1/2". 
> I do not get the error when I correctly select a single attribute to change. 
>  
> I commented the line out and everything seems to work fine. 
>  
>  I really like the feature that displays the amount of stock available in the Shopping Cart when a customer orders more than the current stock level. However, the Shopping Cart displays a message, "Items not in stock will be placed on backorder" and the customer is billed for the entire quantity.  
>  
> My bank rep that is setting up my Authorize.net account told me that all orders must be shipped within seven days from the order date. Since that is not possible with some backorders, how do I prevent backorders from occurring?  
>  
> If there are 5 items in stock and the customer is trying to buy 10, is there a way for me to advise them to adjust the order quantity or prevent them from placing an order for items that exceed the quantity that I can ship?
>  
> The best solution would be to actually put it on backorder and not bill the customer for backordered items until they ship, but I don't think we can do that with the current version of Zen Cart. *** hint, hint, hint for future release ***I'm afraid I can't comment on the coding for the 4.7a as I've never seen it (is that the same as the 4.7MULTIADD version in the downloads area?)

You can prevent backorders by setting Admin > Configuration > Stock > Check stock level to "true" and in the same menu setting Allow Checkout to "false".

You can also change the text of the message that the customer sees in the shopping cart, by editing the relevant language file.

You "best solution" isn't really feasible and is unlikely to become so. Stock by Attributes doesn't know anything about how your payment module functions, but has to assume that it is in the majority which would have no way of collecting a second payment at a later date. If your payment module doesn't support it, then you would only be able to collect the later payment by holding card information in a way which for most Zen Cart would be a flagrant breach of the stringent card regulations, and therefore no something that you're even likely to see built in to Zen Cart.
4 Jul 2008, 11:20 PM
#454
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

xNBSx:

If I dont select a checkbox, I can continue the order without anything selected and even check out! Is there a way to only continue if only a check box is selected?No. Stock by Attribute ignores checkboxes. You've told us that you're using them for colors. Most times that would be a mistake as checkboxes represent "AND" options, unlike radio buttons which are "OR" options. Using checkboxes in place of radio buttons would need you to define and hold data about an exponentially larger number of product variants.

xNBSx:

Problem 2
This Product page also serves as a history of the different variations of the product for consumers information. When a product is no longer available, I would like to keep it on the Product page.

Is there a way to eliminate the checkbox for that variation? Or is there a way to have an add to cart on each variation, versus using checkbox's and having one general add to cart?This is a question about Zen Cart in general rather than Stock by Attributes, but I believe that the answer is again no.

xNBSx:

Problem 3
I have two variations, one with a stock of 4, one with a stock of 0. The stock of 4 works great and doesn't allow someone to check out with more than 4, but the one with zero, even though it gives the warning message, it will let you checkout with an order.Not enough information here to diagnose the problem, but it sounds like it could be a symptom of one of the installation problems that people sometimes ahve and which have been dealt with at length in earlier posts.

4 Jul 2008, 11:44 PM
#455
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

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

Are there comment tags to look for so I know what code to insert? I have installed all the other unique pages.

5 Jul 2008, 1:53 AM
#456
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

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

Just installed the contribution. Very tedious as the mods are not clearly defined so you need to compare each incident of // and or attributes when modifying modified core pages.

Perhaps the next version can be more clear.

In admin, the heading shows but no columns or functions.

In the directions where is includes/modules/YOUR_TEMPLATE ? All there is is includes/modules/pages.

Was there another copy of tpl_shopping_cart_default.php to overwrite in includes/templates/template_default/templates/tpl_shopping_cart_default.php ?

Please clarify. See attached image. Thanks in advance.

5 Jul 2008, 8:27 AM
#457
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

webskipper:

Just installed the contribution. Very tedious as the mods are not clearly defined so you need to compare each incident of // and or attributes when modifying modified core pages.If I understand your series of posts correctly, you have chosen not to follow the installation process designed for this complex mod, and instead are attempting the apply all the changes to the core files by hand. I'm not surprised that you're finding it tedious. It's not designed to be done this way.

webskipper:

Perhaps the next version can be more clear.If you read back over the thread, you'd find that this mod has had multiple owners over a relatively long period of time and is now on life support being kept alive only until it is superceded by changes in core Zen Cart to provide this functionality. So I wouldn't hold out any hope for a new version.

webskipper:

In admin, the heading shows but no columns or functions.Implementing the changes by hand would be a long and complex job. It would be unlikely that you would get it right first time. I recommend getting a good file comparison tool such as WinMerge to compare your changes to the files where the changes have already been done for you.

webskipper:

In the directions where is includes/modules/YOUR_TEMPLATE ? All there is is includes/modules/pages.This is a left over reference to earlier versions where the modules/attributes.php file needed to be over-ridden. Although that was dropped from this mod a few versions back, there is an add-on mod to it (!) where I believe that this is still necessary. If you're just using stock by attributes, just ignore it.

webskipper:

Was there another copy of tpl_shopping_cart_default.php to overwrite in includes/templates/template_default/templates/tpl_shopping_cart_default.php ?You wouldn't over-write this file. You would over-ride it by placing the version providing in the release package in your equivalent of the includes/templates/YOUR_TEMPLATE/templates folder.

5 Jul 2008, 8:37 AM
#458
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

Tech-E:

I just installed 4.7a on a Zen Cart 1.38a installation. I have an issue to draw to attention to and a question.

The first time I went to set stock quantities on a product with two attribute variations, I accidentally selected Both for the product to select for change. I got a Headers Already Sent error that I traced to admin/products_with_attributes_stock.php, line 193. The following echo statement generates the error.

echo "att: $attributes<bR>\n";

> The line generated output that displays "att: 1/2". 
> I do not get the error when I correctly select a single attribute to change. 
>  
> I commented the line out and everything seems to work fine.I've now taken a look at the multi-add version. It is the same thing as 4.7a, which seems to be it's internal name.

I can confirm that you can safely comment out line 193. It's almost certainly a debug statement that has been left in there erroneously.
5 Jul 2008, 8:38 AM
#459
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

pRS317:

I uninstalled zen cart and resintalled it and the module and now everything seems peachy. Obviously some error on my part was to blame.... or on the part of your FTP program. Your symptoms sound like not all the files made it safely to your server first time around.

5 Jul 2008, 10:10 AM
#460
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

SteveKim:

Kuroi,

Thanks for the great mod. I can now stop refunding customers and preventing them from coming back.

However, I have couple of questions since I'm having some difficulty creating query regarding above-quoted message.

How should I match my MS-Access data that does not include Zen-cart's products_id and stock_attributes fields with Zen-Cart's? I'm not in a power to specify neither products_id nor stock_attributes when I created them.

How would you write a query if I could import products_attributes, products and products_options_values tables into my MS-Access DB (or any DB), when I also had, for the convenience, Easy Populate importable table?
Stock by Attributes can't work without knowing the product ID and attribute IDs to which each stock figure applies. So you would need to upload your data to a temporary table in your database and then use a SQL query to create a join between whatever information your Zen Cart products and your external data have in common, e.g. product name and option name. However, unless these match exactly, you will be unable to make the join.