How to work the webshop?

Author Message

Jon Staines

Monday 30 April 2007 4:21:36 am

Hi,

I've been trying to understand how to set up a shop in eZ Publish using the forum posts about it. And I'm getting confused.

I've added an extension to hold the shipping details which has a section:

    function getShippingInfo( $productCollectionID )
    {
        return array(
        'description' => 'Shipping',
        'cost' => 10,
        'is_vat_inc' => 1,
        'vat_value' => 17.5,
        );
    }

But when I look at the basket I get:

Subtotal Inc. VAT: 	£ 18.00  	 
Shipping: 	£ 10.00 	 
Order total: 	£ 28.00 	
 
Basket summary:
Sub total Ex VAT: 	£ 15.32 	 
Shipping total Ex VAT: 	£ 10.00 	 
Total VAT (17.5%): 	£ 2.68 	 
Order total: 	£ 8.51 	

So the top part is ok. And the Sub total Ex VAT seems to work. But then it starts going wrong. The values don't make any sense.

Help! Am I making some really obvious mistake? Is the a nice tutorial anywhere?

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:40:38
Script start
Timing: Jan 18 2025 18:40:38
Module start 'layout'
Timing: Jan 18 2025 18:40:38
Module start 'content'
Timing: Jan 18 2025 18:40:39
Module end 'content'
Timing: Jan 18 2025 18:40:39
Script end

Main resources:

Total runtime0.9276 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.0156152.6094
Module start 'layout' 0.00460.0022 741.625039.4141
Module start 'content' 0.00690.9191 781.0391439.8125
Module end 'content' 0.92600.0016 1,220.85168.3359
Script end 0.9276  1,229.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3257160.0002
Check MTime0.00130.1348160.0001
Mysql Total
Database connection0.00060.060410.0006
Mysqli_queries0.887995.7194460.0193
Looping result0.00050.0592440.0000
Template Total0.899597.020.4498
Template load0.00200.212120.0010
Template processing0.897596.758320.4488
Template load and register function0.00010.009910.0001
states
state_id_array0.00130.142610.0013
state_identifier_array0.00110.121820.0006
Override
Cache load0.00160.1677120.0001
Sytem overhead
Fetch class attribute can translate value0.00080.089310.0008
Fetch class attribute name0.00070.074320.0003
XML
Image XML parsing0.00040.046910.0004
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00120.1244160.0001
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs