Forums / All Other Contributions/Addons / Stocks by attributes

Stocks by attributes

Locked

Views: 251,699

Results 101 to 120 of 1,126
This thread is locked. New replies are disabled.
29 Aug 2006, 11:37 PM
#101
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

Stocks by attributes

buzzville:

Well, I've got the units set to .5 yards for all items sold that way, and it works fine for products without attributes. I've looked in the files for the stock by attributes mod for a decimal or unit designation, but I haven't found anything. But, I probably have no idea what I'm looking for! I'm sure there must be a way to adjust the unit for the attributes - I'm just not savvy enough to know where that is...

Apologies if I'm stating the obvious :)
But for products with atttributes and units of .5 yards...

if you have 10 yards, then you need to state that you have 20 of the item...

Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2

30 Aug 2006, 12:14 AM
#102
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Stocks by attributes

is the quantity field in the database set to int or float ? int requires whole numbers, whereas float allows decimals of varying precision

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Aug 2006, 12:28 AM
#103
buzzville avatar

buzzville

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Stocks by attributes

DrByte:

is the quantity field in the database set to int or float ? int requires whole numbers, whereas float allows decimals of varying precision

applause Thank you DrByte! That seems to have done the trick! Thanks for helping those with zero skills to figure this stuff out!

30 Aug 2006, 2:26 AM
#104
mikeyg avatar

mikeyg

Totally Zenned

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

Re: Stocks by attributes

MikeyG:

could some one please explain how the stock_attributes column in the table product_with_attribute_stock can be translated back to work out the name (value) of the attribute option.

MG

Sorry to bounce but would really like some one to explain how this works so I can use it in other ways to manage stock.

Thanks

MG

3 Sep 2006, 4:00 PM
#105
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Stocks by attributes

Hey all!

I'm just about to upgrade my ZC from 1.2.7 to 1.3.0.2.
Everything has been running smoothly but now I've met some hard resistance.

I've downloaded this contrib and installed it without any problems.
But now it fetches ALL attributes on each product who has attributes.
As far as I can see the package is missing attributes_controller.php

Am I right? Anyone who could supply me with the file?

3 Sep 2006, 5:36 PM
#106
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Stocks by attributes

Svanis:

attributes_controller.phpThat should be "main_template_vars_attributes.php"

5 Sep 2006, 10:07 PM
#107
buzzville avatar

buzzville

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Stocks by attributes

Bunster:

Just to follow up on my previous post.

I have managed to convince my cart that it should display the stock level warning in red by editing the following piece of code in includes\functions\function_lookups.php

// modified to include attributes
function zen_check_stock($products_id, $products_quantity, $attributes = '') {

$stock_left = zen_get_products_stock($products_id, $attributes) - $products_quantity;
$out_of_stock = '';


if ($stock_left < 0 && !is_array($attributes)) {
  $out_of_stock = '<br/><span class="alert bold"><span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
}
elseif ($stock_left < 0 && is_array($attributes)) {
  $out_of_stock = '<br/><span class="alert bold"><span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
}

return $out_of_stock;

}

Hi Bunster,

I'm having the same problem and tried this fix, but it's still not working for me... I can either get the insufficient stock message for products with attributes or products without, but not both at the same time. Is this still working for you? I'm starting to think this mod is hurting me more than it's helping me...

6 Sep 2006, 12:39 AM
#108
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Stocks by attributes

buzzville:

Hi Bunster,

I'm having the same problem and tried this fix, but it's still not working for me... I can either get the insufficient stock message for products with attributes or products without, but not both at the same time. Is this still working for you? I'm starting to think this mod is hurting me more than it's helping me...

try my fix on previous post within the same thread; http://www.zen-cart.com/forum/showpost.php?p=229417&postcount=39

"Whether you think you can, or you think you can't... YOU ARE RIGHT."
GOOD LUCK !!!

6 Sep 2006, 4:47 PM
#109
bunster avatar

bunster

New Zenner

Join Date:
Jan 2006
Posts:
40
Plugin Contributions:
0

Re: Stocks by attributes

Hi Buzzvile,

yes as tajul_ashyqin said you will need to add that piece of code as well.
But it still will not display your available stock so your customers will have to guess the magic number for available stock.

To be honest I have now given up trying to get this to function as I want it to and am now looking for alternatives.

I believe this functionality will be in ZCv1.4 but it'll be a while before that see's the light of day, the dev team have more than enough on their plate to be getting on with so no point in pestering them.

good luck

Bunster

Bunster

Nothing worth having ever comes easy, so don't give up!

6 Sep 2006, 8:12 PM
#110
buzzville avatar

buzzville

New Zenner

Join Date:
May 2006
Posts:
87
Plugin Contributions:
0

Re: Stocks by attributes

Thanks Tajul_ashykin and Bunster. It was the functions_lookup.php file that was the trick. I kept changing one section of code, but missed a second section that did the trick. Now the low stock message is working for both types of stock... I just need to pay a little more attention! Now to see if I can figure out how to get the quantities to show...

7 Sep 2006, 12:04 AM
#111
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Stocks by attributes

buzzville:

... Now to see if I can figure out how to get the quantities to show...

do not forget to post it in these forum as i am also trying to achieve it but still no luck... :blush:

"Whether you think you can, or you think you can't... YOU ARE RIGHT."
GOOD LUCK !!!

7 Sep 2006, 9:03 AM
#112
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Stocks by attributes

When I've added a product to my cart and then goes back to the product to add it once more this takes me to the cart but doesn't add the product.

This occurs both when adding a new attribute aswell as adding the previously added attribute to the shopping cart.

Products with no attributes works fine.

Seems to be some problems with sessions since removing the session id from the addressbar makes it possible to add the product/attribute to my cart.

I do not know if this relates to this contrib but I saw the problem after installing it.

8 Sep 2006, 12:47 AM
#113
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

Re: Stocks by attributes

Svanis:

When I've added a product to my cart and then goes back to the product to add it once more this takes me to the cart but doesn't add the product.

This occurs both when adding a new attribute aswell as adding the previously added attribute to the shopping cart.

Products with no attributes works fine.

Seems to be some problems with sessions since removing the session id from the addressbar makes it possible to add the product/attribute to my cart.

I do not know if this relates to this contrib but I saw the problem after installing it.

works fine on my site!:D

"Whether you think you can, or you think you can't... YOU ARE RIGHT."
GOOD LUCK !!!

8 Sep 2006, 8:34 AM
#114
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Stocks by attributes

tajul_ashyqin:

works fine on my site!:D
Yeah, thats a good answer..

8 Sep 2006, 12:55 PM
#115
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Stocks by attributes

Anyone got it working in ZC 1.3.5 ?

I receive this error:

Fatal error: Call to undefined function zen_get_new_date_range() in c:\xxxxxx\includes\templates\template_default\sideboxes\tpl_categories.php on line 75

But when I was "un-installing" it, it seems that the error message comes from functions_lookups.php because when I overwrite the file with the original one, the message disapaers...

/Typhoon

9 Sep 2006, 7:05 PM
#116
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

Re: Stocks by attributes

MikeyG:

Sorry to bounce but would really like some one to explain how this works so I can use it in other ways to manage stock.

Thanks

MG
Sorry MG, I can't help you out. The mod was written by danielcor. He was kind enough to offer it to the community even though he did not have the time for that. I packed it up for him, but have no programming knowledge myself. It was a gift to be taken as is. Although he does not frequent this thread I believe he is active on the forums.

Typhoon,
I have not tried this on 1.3.5, but expect to shortly. I will report back.

Audra

10 Sep 2006, 12:09 PM
#117
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

All credit to danielcor for getting this working in Zen Cart 1.3. However, it's been three months since he posted anywhere in the forum, so I think we have to assume that he isn't around at the moment to take it forward.

Consequently, as a personal favor to Bunster, I have taken this add-on, tidied it up a little (i.e. reduced the number of core files that need to be over-ridden) and upgraded it to work with Zen Cart 1.3.5, with the intention of also looking at some of the problems people, e.g. Bunster, have been experiencing with it.

However, there's a catch. I have no previous experience of using Zen Cart to manage stock by attributes. The good news is that there seems to a fairly active user community for this add-on, so this is a call for Beta Testers.
:beta:
If you have used previous versions of this add-on, understand that this will be a beta version supplied for testing purposes only, are ready to test on Zen Cart 1.3.5 and promise to provide feedback on what works and what doesn't, then PM me. The add-on is in alpha test at the moment and will be ready for beta test shortly.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

10 Sep 2006, 1:14 PM
#118
typhoon avatar

typhoon

Zen Follower

Join Date:
Jul 2006
Posts:
144
Plugin Contributions:
0

Re: Stocks by attributes

audradh: Thank you, looking forward for your answer...

kuroi: This is a very good initiative from you that is very appreciated around here, for sure. Please let me (us) know when you have the beta test available, I'll be happy to try it out.

Regards,
/Typhoon

10 Sep 2006, 2:07 PM
#119
bunster avatar

bunster

New Zenner

Join Date:
Jan 2006
Posts:
40
Plugin Contributions:
0

Re: Stocks by attributes

Thanks Kurio, I think you have just put a big smile on a lot of faces knowing this mod is being looked at.

Bunster

<Bunster scurries off to eagerly prepare a ZC1.35 test server>

Bunster

Nothing worth having ever comes easy, so don't give up!

10 Sep 2006, 2:58 PM
#120
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

I sure hope so Bunster.

Good news is that alpha testing is progressing very smoothly, so smoothly in fact that I've been going back over this thread and adding fixes for those of the bugs reported that I understand.

Please note however, that as I hope this code will become redundant when Zen Cart 1.4 is released, there are quite strict limits on the amount of development that will be done to this add-on.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)