Jump to content

Add to cart button, which php file calls?


DarthFener

Recommended Posts

In product.tpl,I have to send some information (textfield) of the product form to the Cart.php, but it seems that the $_POST variable (or Tools::getValue) is empty, so I think that the php file is another.

 

The "action" attribute of product.tpl is

 

$link->getPageLink('cart')

 

but actually, I don't know the exact php file. 

 

Do you know which php file is?

Link to comment
Share on other sites

Information:

I read the function Link->getPageLink and all the operations is doing is:

 

$controller = Tools::strReplaceFirst('.php', '', $controller);

 

so it returns $controller which will be "Cart.php".

 

But Why I can't read the $_POST fields? where do I am wrong doing this:

 

$this->altezza = $_POST['altezza'];
$this->larghezza = Tools::getValue("larghezza");
 
where in the cart form of the product:
 
<label>{l s='Base (cm)'}</label>
<input type="text" name="altezza" id="altezza" class="text" />
<label>{l s='Altezza (cm)'}</label>
<input type="text" name="larghezza" id="larghezza" class="text"/>
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...