Forums / Developer / Ezsimplestockcheck Extension Problem

Ezsimplestockcheck Extension Problem

Author Message

PaoloMellerio kk

Thursday 18 May 2006 7:51:20 am

Hi to all,

I've downloaded and installed the Ezsimplestockcheck Extensions on Ez 3.6.5 for managing inventory in a web shop.
I've followed the documentation, but testing the functionality in Administration Interface, the order is closed but the attribute quantity of the product choosen is not decremented.

Any Idea?

THX in Advice
Paolo Mellerio [Clikka!com]

Paolo Mellerio
http://www.clikka.com

Stuart Fenton

Thursday 18 May 2006 8:03:02 am

Is the attribute called "quantity" as this is the required name. You can change the code at line 67 to whatever attribute name you need.

Have you created a workflow to run the ezsimplestockcheck workflow?

Also you need to create a trigger event to run the workflow. Set the trigger to trigger event to AFTER the shop transaction is complete.

I haven't tried to use it from the administration side only the user side.

Regards
Fats

-- Stuart

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

PaoloMellerio kk

Thursday 18 May 2006 8:18:11 am

Hi Fats,

i've created a new workflow with the Event/SimpleStockCheck and then applied the new workflow after checkout in Shop Module.

I've created workflow.ini.append.php in settings/override with the follwing content:

[EventSettings]
ExtensionDirectories[]
ExtensionDirectories[]=ezsimplestockcheck

# A list of events, each entry consists of the group
# and the name with a _ as separator
AvailableEventTypes[]=ezsimplestockcheck

The attribute is called "quantity" in my product class.

I don't believe that it doesn't work in the admin interface...

THX for your answer.
Paolo

Paolo Mellerio
http://www.clikka.com

PaoloMellerio kk

Thursday 18 May 2006 8:29:40 am

Ok, after a forced clearing cache in the Admin Interface, the product show the correct decremented value: probably in the template admin interface there is a cache-block which "hides" the correct value of quantity after the end of the e-com procedure in admin interface.
Now I'll test it in the public side, for see if it works without a forced clearing cache.

Bye
Paolo

Paolo Mellerio
http://www.clikka.com

Stuart Fenton

Thursday 18 May 2006 8:34:26 am

The code should work as it's very simply. I never tried it on 3.6.5 but I wrote it for 3.7.2.

Do you have a development environment setup whereby you can set a breakpoint in your code and look at what happens when you get the the extension?

It may be that the extension is never getting called. Make sure you dump your cache. If you switch on debug you should get some output.

There are a few lines like:
eZDebug::writeNotice( $parameters, "parameters" );

In the code which should output the variables.

IF there is no output the extension is not live.

Regards
Fats

-- Stuart

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

eZ debug

Timing: Jan 19 2025 08:47:19
Script start
Timing: Jan 19 2025 08:47:19
Module start 'content'
Timing: Jan 19 2025 08:47:19
Module end 'content'
Timing: Jan 19 2025 08:47:19
Script end

Main resources:

Total runtime0.1466 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 590.1172180.8281
Module start 'content' 0.00850.0057 770.945397.8828
Module end 'content' 0.01420.1322 868.8281526.2969
Script end 0.1464  1,395.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00392.6570200.0002
Check MTime0.00150.9943200.0001
Mysql Total
Database connection0.00161.100510.0016
Mysqli_queries0.098267.00431410.0007
Looping result0.00140.97641390.0000
Template Total0.131889.910.1318
Template load0.00120.829510.0012
Template processing0.130689.078910.1306
Override
Cache load0.00080.566210.0008
Sytem overhead
Fetch class attribute can translate value0.00080.555310.0008
XML
Image XML parsing0.00040.269510.0004
General
dbfile0.00291.9790200.0001
String conversion0.00000.004130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs