ezsimplestockcheck contribution

Author Message

Stuart Fenton

Thursday 08 December 2005 9:55:00 am

I've added a new contribution to the community.

The extension enable simple stock control of items to be sold. When creating an item for sale simply enter an attribute with an identifier called "quantity".

Then when it is purchased it decrements the quantity field by the quantity ordered.

It's not very elegant but is perfect from small solutions.

Were using it for a training company that sells a specific number of places on the course. This decreases the available slots as they are filled.

Regards
Fats

Contibution is here:
http://ez.no/community/contribs/workflow/ezsimplestockcheck

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Lukasz Piech

Thursday 05 July 2007 7:18:37 am

Hi,

When I activate this extension it disables other workflow events, ie shopsender and others

How to prevent it?

Lukasz

Stuart Fenton

Thursday 05 July 2007 1:55:34 pm

Hi there.

The extension modifies the objects added to the basket one after the other but this should not interfere with other workflows.

Have you tried using it at the end of your workflows or using it inside a multiplexer?

Regards
Stuart

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Lukasz Piech

Sunday 08 July 2007 1:53:37 am

Hi

This is not the problem here. The problem is that whenever i activate the simple stock check in Extensions in Admin interface it disables another extension - shopsender in a sense that the weokflow event for shopsender dissapears.

Lukasz

Lukasz Piech

Sunday 08 July 2007 2:01:04 am

OK. SOLVED.

Apparently it indeed interferes with shopsender but there is a solution for this:
Instead of activating it in admin interface you need to add it to /settings/override/site.ini.append.php

ActiveExtensions[]=ezsimplestockcheck

then it works OK

Lukasz

Lukasz Piech

Sunday 08 July 2007 2:23:35 am

Another thing though

Is it possible to create a custom view that lists all products and the quantities?

Has anyone done this already?

Lukasz

Eivind Marienborg

Monday 19 November 2007 12:27:53 am

In my webshop I have different sizes of the same product, using the option data type, for example tshirts in small, medium and large sizes. The relevant would then be to know the remaining quantity of each size.

Is there any plans on extending this contribution to handle this type of scenario, or is there anonther contributuin enabling this?

Stuart Fenton

Wednesday 21 November 2007 2:57:54 am

You could create three separate Quantity attributes, one for each size, then check which one was selected during checkout and reduce the quantity of that attribute.

This would do what you need.

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Joe Lancros

Wednesday 07 April 2010 3:35:35 am

Hey,

Did you ever get ant further with this contribution. I am developing a site that sells products in 'bundles' (the products are made up of different items) thus I need to check the options before reducing the quantity of that attribute, as pointed out by Stuart but I have no idea how to call the product options up in the stock-check workflow php.

The task gets more complex as some products use the same items, thus the quantities must take into account all the products that have been sold.

Any ideas or example code would be much appreciated

Joseph

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:55:53
Script start
Timing: Jan 18 2025 04:55:53
Module start 'layout'
Timing: Jan 18 2025 04:55:53
Module start 'content'
Timing: Jan 18 2025 04:55:55
Module end 'content'
Timing: Jan 18 2025 04:55:55
Script end

Main resources:

Total runtime1.2324 sec
Peak memory usage4,096.0000 KB
Database Queries79

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.0469152.6250
Module start 'layout' 0.00700.0029 741.671939.4453
Module start 'content' 0.00991.2209 781.1172674.0000
Module end 'content' 1.23080.0015 1,455.117220.1641
Script end 1.2324  1,475.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2456160.0002
Check MTime0.00130.1080160.0001
Mysql Total
Database connection0.00080.068110.0008
Mysqli_queries1.158293.9771790.0147
Looping result0.00090.0695770.0000
Template Total1.194696.920.5973
Template load0.00200.166120.0010
Template processing1.192596.764020.5963
Template load and register function0.00010.011010.0001
states
state_id_array0.00120.098510.0012
state_identifier_array0.00260.207220.0013
Override
Cache load0.00180.1449550.0000
Sytem overhead
Fetch class attribute can translate value0.00060.047940.0001
Fetch class attribute name0.00260.2102110.0002
XML
Image XML parsing0.00260.212140.0007
class_abstraction
Instantiating content class attribute0.00000.0019130.0000
General
dbfile0.00440.3572220.0002
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs