Jump to content

transfer of individually calculated prices in shopping cart


sefrei

Recommended Posts

Hello,

 

I'm about to create a module for individual price calculation for presta 1.5. My interfaces for the frontend and the backend seem to work well. But the last step doesn't work : once a price is calculated, I need to transfer the calculated product {$result} to the shopping cart.

 

Here's what I've got in Module.php :

 

$smarty->assign('result', $largeur*$longueur*$nbAdmin);

 

In Module.tpl, there's :

 

length X with X nbAdmin =

{$result}

 

 

in order to transfer to the shopping cart, I made a copy of the following code :

 

<form id="buy_block12" action="{$base_dir}cart.php" method="post">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" id="product_page_product_id" value="1" name="id_product">

<input type="hidden" value="1" name="add">

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

 

<input type="submit" name="Submit" value="{l s='Ajouter au panier'}" class="exclusive" /></p>

</form>

 

and actually, the result in cart.php :

 

There's an error :

1. This product isn't available any more.

 

 

I understand this because the value isn't assigned to any product, but what can I do ?

 

Thanks s a lot for Your answers and I wish You a happy and good New Year !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...