Cart Made SImple - Add billing info
Posted: Wed Jan 13, 2010 6:14 pm
Hello,
I've been using CMS for a few years now, and recently developped a website using Shop made Simple, Cart Made Simple and Payment Made Simple.
I'm having the following problem.
I would like to add 2 variables to the Billing info:
-$billname: billing name (name of the company to be invoiced)
-$billvat: billing VAT (VAT number of the company to be invoiced)
I added the following code to action.orderaddress.php:
and
I added the following code to action.orderconfirm.php and to action.ordershowdetail.php:
In the language file I added:
Cart templates changed accordingly:
fe_shipping_info:
fe_orderconfirm:
The inputfields appear correctly in the first step of the orderform, but the two variables don't show the entered information in the order confirm step nor do they show up in the order detail view in the admin.
Am I missing something here? It seems the variables are not correctly saved, causing them not to show up in the confirmation and the detail view.
Thank you in advance fo any feedback.
Bert
I've been using CMS for a few years now, and recently developped a website using Shop made Simple, Cart Made Simple and Payment Made Simple.
I'm having the following problem.
I would like to add 2 variables to the Billing info:
-$billname: billing name (name of the company to be invoiced)
-$billvat: billing VAT (VAT number of the company to be invoiced)
I added the following code to action.orderaddress.php:
Code: Select all
if (isset($params['billname']) && $params['billname'] == '')
{
$billname = $params['lastname'];
} else {
$billname = $params['billname'];
}
if (isset($params['billvat']) && $params['billvat'] == '')
{
$billvat = 'pas de TVA';
} else {
$billvat = $params['billvat'];
}
Code: Select all
$this->smarty->assign('billname_label', $this->Lang('billname_label'));
$this->smarty->assign('billname_input', $this->CreateInputText($id, 'billname', $billname, 40, 40));
$this->smarty->assign('billvat_label', $this->Lang('billvat_label'));
$this->smarty->assign('billvat_input', $this->CreateInputText($id, 'billvat', $billvat, 40, 40));
Code: Select all
$this->smarty->assign('billtoname', $shipto['billname']);
$this->smarty->assign('billtovat', $shipto['billvat']);
Code: Select all
$lang['billname_label'] = 'Nom';
$lang['billvat_label'] = 'Numéro TVA';
fe_shipping_info:
Code: Select all
<table id="billinfo" cellspacing="0" class="pagetable">
<tr>
<td class="shiplabel">{$billname_label}:</td>
<td class="shipinput">{$billname_input}</td>
</tr>
<tr>
<td class="shiplabel">{$billvat_label}:</td>
<td class="shipinput">{$billvat_input}</td>
</tr>
Code: Select all
<h4>{$billto_label}</h4>
<p>
{$billtoname}
{$billtovat}
Am I missing something here? It seems the variables are not correctly saved, causing them not to show up in the confirmation and the detail view.
Thank you in advance fo any feedback.
Bert