User register override - variables not stored

Author Message

Nuno Portugal

Sunday 26 November 2006 10:23:20 am

Im overriding user register for a shop user that buys a subscription to the website and for that he must register has a "normal user" but i dont want him to fill again the all form, so im using information of his shop account to pass this information to the user register. I solved it copying some code from user register.tpl into orderview.tpl wich is the final step of any buy. Had to include register.php in orderview.php so the functionas are called correctly.

Has the loop woldnt solve my problem took this code from documentation and made some alteration so it may suite my conditions. Login Password and email are stored in database and the user is created but all other information never reaches the database, but i can see it's there for the line {$order.account_information.first_name} displays the correct information

{$content_attributes[13].contentclass_attribute.name} {attribute_edit_gui attribute=$content_attributes[13]}<br>
{$content_attributes[14].contentclass_attribute.name} {attribute_edit_gui attribute=$content_attributes[14]}<br>

{$order.account_information.first_name}
<input type="text" name="ContentObjectAttribute_id[]" value="{$order.account_information.first_name}" />
<input type="text" name="ContentObjectAttribute_id[]" value="{$order.account_information.street2}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$order.account_information.zip}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$order.account_information.place}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[13].id}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[14].id}" />

Can anybody tell me wat is wrong ? I'm not a programmer but the code seems to be correct and it shows all the informations...

Nuno Portugal

Wednesday 06 December 2006 4:13:38 am

Solved it

In orderview.tpl just added this code to make possible user register after payment. The user chosses is password and login, every other atributes are taken from userregister(shop) from that was asked in confirmorder.

{$content_attributes[13].contentclass_attribute.name} {attribute_edit_gui attribute=$content_attributes[13]}<br>
{$content_attributes[14].contentclass_attribute.name} {attribute_edit_gui attribute=$content_attributes[14]}<br>

<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[0].id}" value="{$order.account_information.first_name} {$order.account_information.last_name}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[1].id}" value="{$order.account_information.street2}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[2].id}" value="{$order.account_information.zip}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[3].id}" value="{$order.account_information.place}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[4].id}" value="{$order.account_information.datanasc}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[5].id}" value="{$order.account_information.naturalidade}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[6].id}" value="{$order.account_information.bi}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[7].id}" value="{$order.account_information.contribuinte}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[8].id}" value="{$order.account_information.telefone}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[9].id}" value="{$order.account_information.telemovel}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[10].id}" value="{$order.account_information.localtrabalho}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[11].id}" value="{$order.account_information.habprofissional}"/>
<input type="hidden" name="{$attribute_base}_ezstring_data_text_{$content_attributes[12].id}" value="{$order.account_information.catprofissional}"/>
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[13].id}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[14].id}" />
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$content_attributes[15].id}" />

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 20 2025 17:31:13
Script start
Timing: Jan 20 2025 17:31:13
Module start 'layout'
Timing: Jan 20 2025 17:31:13
Module start 'content'
Timing: Jan 20 2025 17:31:14
Module end 'content'
Timing: Jan 20 2025 17:31:14
Script end

Main resources:

Total runtime0.7655 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 589.1797151.2266
Module start 'layout' 0.00420.0024 740.406336.6797
Module start 'content' 0.00660.7580 777.0859505.2656
Module end 'content' 0.76460.0008 1,282.351611.8125
Script end 0.7654  1,294.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3759160.0002
Check MTime0.00120.1621160.0001
Mysql Total
Database connection0.00060.080610.0006
Mysqli_queries0.722294.3432520.0139
Looping result0.00040.0459500.0000
Template Total0.736596.220.3683
Template load0.00200.264920.0010
Template processing0.734595.952020.3672
Template load and register function0.00010.017510.0001
states
state_id_array0.00120.159310.0012
state_identifier_array0.00100.124920.0005
Override
Cache load0.00180.2313380.0000
Sytem overhead
Fetch class attribute can translate value0.00040.053310.0004
Fetch class attribute name0.00080.104830.0003
XML
Image XML parsing0.00170.220010.0017
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00400.5259130.0003
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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs