Adding Two prices to the node

Author Message

D K

Wednesday 04 March 2009 8:58:49 pm

I have to add following feature.

The users can request for quotation. Then I update pdf with details and two price options. Full Price and the Partly Payment price.

Then user can select either option and make the payment.

I have created the class and done the template.

But when I adding to the basket it always get the first price in the class order (Full Price).

<form method="post" action={"content/action"|ezurl}>
<div class="content-action">
<input type="Submit" class="basketBtn" name="ActionAddToBasket" value="" />
<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
<input type="hidden" name="ViewMode" value="full" />
</div>
</form>
Is ther a option whether user can select the payment amount? or any solution.

Thanks.

http://www.eyepax.com

Bruce Morrison

Wednesday 04 March 2009 9:43:05 pm

Hi DK

eZ Doesn't allow for products to have 2 prices.

To do what you want you need to have both a price and option attribute in your product. In the content object you set the price to 0 and add options for each Full Price and the Partly Payment price.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

D K

Thursday 05 March 2009 9:12:55 pm

Hi Bruce,

I tried with option thing. But it didn't work properly. Then I have gone through the php files and realized that if there are two prices it takes the first price in the attribute loop.So I have added some conditions there. I have changed the basket form (Added new hiiden fields), basket.php added some sessions and ezbasket.php.

It works fine.

Thanks.

http://www.eyepax.com

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 20:53:57
Script start
Timing: Jan 18 2025 20:53:57
Module start 'layout'
Timing: Jan 18 2025 20:53:57
Module start 'content'
Timing: Jan 18 2025 20:53:57
Module end 'content'
Timing: Jan 18 2025 20:53:57
Script end

Main resources:

Total runtime0.0195 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.9141152.6250
Module start 'layout' 0.00690.0030 740.539139.4453
Module start 'content' 0.00990.0074 779.984489.3203
Module end 'content' 0.01730.0021 869.304734.3047
Script end 0.0194  903.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.4062140.0002
Check MTime0.00115.4953140.0001
Mysql Total
Database connection0.00136.561010.0013
Mysqli_queries0.002713.903530.0009
Looping result0.00000.061210.0000
Template Total0.00189.110.0018
Template load0.00104.937910.0010
Template processing0.00084.136810.0008
Override
Cache load0.00073.488710.0007
General
dbfile0.002613.553280.0003
String conversion0.00000.039240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs