Forums / Developer / Adding Two prices to the node

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