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?!?

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 18:31:42
Script start
Timing: Jan 18 2025 18:31:42
Module start 'layout'
Timing: Jan 18 2025 18:31:42
Module start 'content'
Timing: Jan 18 2025 18:31:43
Module end 'content'
Timing: Jan 18 2025 18:31:43
Script end

Main resources:

Total runtime0.8087 sec
Peak memory usage4,096.0000 KB
Database Queries78

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 589.3672152.6250
Module start 'layout' 0.00930.0040 741.992239.4453
Module start 'content' 0.01330.7938 781.4375709.6172
Module end 'content' 0.80720.0015 1,491.054720.1563
Script end 0.8086  1,511.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4783160.0002
Check MTime0.00140.1733160.0001
Mysql Total
Database connection0.00370.461110.0037
Mysqli_queries0.726789.8573780.0093
Looping result0.00090.1122760.0000
Template Total0.765994.720.3830
Template load0.00280.348420.0014
Template processing0.763194.362820.3815
Template load and register function0.00010.013710.0001
states
state_id_array0.00140.169910.0014
state_identifier_array0.00090.110320.0004
Override
Cache load0.00260.3171470.0001
Sytem overhead
Fetch class attribute can translate value0.00090.116750.0002
Fetch class attribute name0.00150.1859110.0001
XML
Image XML parsing0.00210.254550.0004
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00160.1957280.0001
String conversion0.00000.001140.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs