I am creating an virtual store with wordpress and pagseguro (something like paypal) plugin.
the problem is: Pagseguro plugin is really simple, all it does is: add the "add to cart" button to your post and than the "pay" button.
I want to sell cloths and I need my clients to chosse b/t sizes and colors. So I tried doing the following:
to show the "add to cart" button i need to use this code:
<object><form method="post" action="" style="display:inline">
<input type="submit" value="ADD TO CART" />
<input type="hidden" name="product" value="PRODUCT NAME" /><input type="hidden" name="price" value="PRICE" /><input type="hidden" name="addcart" value="1" /><input type="hidden" name="cartLink" value="PERMALINK" />
</form></object>
(The name and price of the product is automatically generated with custom fields. )
So I wanted to add the following on single.php:
<form method="POST" action="trata_dados.php">
<select name="tamanho">
<option value="">Escolha um Tamanho</option>
<option value="P">Pequeno</option>
<option value="M">Medio</option>
<option value="G">Grande</option>
</select>
<input type="radio" name="cor" value="amarelo" />Amarelo
<input type="radio" name="cor" value="vermelho" />Vermelho
<input type="radio" name="cor" value="azul" />Azul
</form>
(so people could chosse their size and color)
Than, on trate_dados.php:
<?php
if($_POST){
$tamanho = $_POST['tamanho'];
$cor = $_POST['cor'];
}
?>
Than I would add after the prodct name on the "add to cart" code:
<?php echo $tamanho.$cor;?>
Which would insert the size and color after the product name.
I tried that by 1000 ways, and still nothing.... I've been trying for 3 days.... Pleaase, help me..
What am doing wrong?