Forums / Developer / The purpose of shop account handlers

The purpose of shop account handlers

Author Message

Eirik Alfstad Johansen

Wednesday 21 January 2004 2:26:11 am

Hi,

I'm having some trouble grasping the concept of shop account handlers and how to use them. AFAIK, shop account handlers are designed to make it easier and extensible to decide which data fields are stored (and fetched for orderview) in conjunction with the order head.

However, if this is the case, why does shop/register have the account_identifier and the form field names for the validation procedure hardcoded? Shouldn't the account identifier be fetched from the INI settings, and the validation be done in the shop account handler?

Thanks in advance !

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Monday 02 February 2004 7:27:29 am

Hi guys,

I refuse to belive that editing shop/register.php is the only way to alter which fields that are stored in conjunction with an order header (data_text_1).

Is this really the case? There's surely must be others who have worked their way around this, without modifying the kernel.

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Petter Arneson

Wednesday 30 August 2006 7:12:47 am

How did you eventually do this?

What is the structure of a shophandler extension?

I have tried something like:

 extensions\myshophandler
   --> shopaccounthandlers
       --> shopaccounthandlers\myshophandlershopaccounthandler.php
       --> shopaccounthandlers\userregister.php
   --> settings
       --> shopaccount.ini.append.php
       --> site.ini.append.php
   --> design
      --> standard\templates\shop\userregister.tpl
 

Where shopaccount.ini.append.php contains:

#?ini charset="iso-8859-1"?

[HandlerSettings]
Repositories[]=kernel/classes
ExtensionRepositories[]=myshophandler

[AccountSettings]
Handler=ezuser

Alias[]
Alias[ezuser]=myshophandler

I got the shophandler to run, but I cant seem to connect to my userregister.php. Do I have to make a module folder for this?

I would really appretiate help, so I could avoid making changes in the kernel.

www.vzt.no

Petter Arneson

Wednesday 30 August 2006 2:57:48 pm

Ah, ok.

A module folder did the trick ;)

www.vzt.no

Mathias VITALIS

Sunday 03 September 2006 4:43:30 pm

Hi,
Could you explain what you did to change the userregister.php ?
I try to create new true user account when an anonymous user buy into the shop, and I think this is the way.
Thanks in advance !

Mathias VITALIS
- www.SilverHand.fr -

Andreas Adelsberger

Monday 28 April 2008 8:00:08 am

Hi, could you please explain how you got your custom userregister.php working?

Can I override the kernel classes using the new autoload mechanism?

Thanx Andi

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Petter Arneson

Tuesday 14 October 2008 6:05:00 am

The structure you need would be something like this:

extensions\myshophandler

  --> design
     --> standard\override\templates\shop\userregister.tpl
     --> standard\override\templates\shop\accounthandlers\html\ez.tpl

  --> modules
     --> myshophandler\module.php
     --> myshophandler\userregister.php

  --> shopaccounthandlers
      --> shopaccounthandlers\myshophandlershopaccounthandler.php

  --> settings
      --> design.ini.append.php
      --> module.ini.append.php
      --> shopaccount.ini.append.php
      --> site.ini.append.php

Module.php should look like this:


$Module = array( 'name' => 'myshophandler', "variable_params" => true );

$ViewList = array();

$ViewList["userregister"] = array(
    "functions" => array( 'buy' ),
    "script" => "userregister.php",
    'ui_context' => 'edit',
    "default_navigation_part" => 'ezshopnavigationpart',
    'single_post_actions' => array( 'StoreButton' => 'Store',
                                    'CancelButton' => 'Cancel'
                                    )
    );

www.vzt.no

Andrei Popa

Tuesday 14 October 2008 6:23:06 am

Thank you very much. Great person.

What do I do?! What do I do?!?

eZ debug

Timing: Jan 18 2025 15:20:28
Script start
Timing: Jan 18 2025 15:20:28
Module start 'content'
Timing: Jan 18 2025 15:20:29
Module end 'content'
Timing: Jan 18 2025 15:20:29
Script end

Main resources:

Total runtime0.7725 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 590.0391180.8281
Module start 'content' 0.00630.6793 770.8672712.7734
Module end 'content' 0.68560.0869 1,483.6406340.4297
Script end 0.7725  1,824.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.5689210.0002
Check MTime0.00150.1962210.0001
Mysql Total
Database connection0.00090.112510.0009
Mysqli_queries0.698590.41502150.0032
Looping result0.00160.20182130.0000
Template Total0.743196.220.3715
Template load0.00250.326420.0013
Template processing0.740695.859620.3703
Template load and register function0.00010.011010.0001
states
state_id_array0.00100.130910.0010
state_identifier_array0.00080.098620.0004
Override
Cache load0.00230.3015470.0000
Sytem overhead
Fetch class attribute can translate value0.00100.124360.0002
Fetch class attribute name0.00090.1210110.0001
XML
Image XML parsing0.00310.405760.0005
class_abstraction
Instantiating content class attribute0.00000.0026120.0000
General
dbfile0.00430.5554390.0001
String conversion0.00000.000630.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
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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs