[+] BO: Add a wizard to create and edit your carriers
This commit is contained in:
@@ -156,33 +156,16 @@ class AdminCarriersControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
parent::initToolbar();
|
||||
|
||||
if (isset($this->toolbar_btn['new']))
|
||||
$this->toolbar_btn['new']['href'] = $this->context->link->getAdminLink('AdminCarrierWizard');
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
$this->displayInformation(
|
||||
' <b>'.$this->l('How do I create a new carrier?').'</b>
|
||||
<br />
|
||||
<ul>
|
||||
<li>'.$this->l('Click "Add New."').'<br /></li>
|
||||
<li>'.$this->l('Fill in the fields and click "Save."').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set a price range -- or weight range -- for which the new carrier will be available.').' '.
|
||||
$this->l('Under the "Shipping" menu, click either "Price ranges" or "Weight ranges.".').'
|
||||
</li>
|
||||
<li>'.$this->l('Click "Add New."').'</li>
|
||||
<li>'.
|
||||
$this->l('Select the name of the carrier before defining the price or weight range.').' '.
|
||||
$this->l('For example, the carrier can be made available for a weight range between 0 and 5lbs. Another carrier can have a range between 5 and 10lbs.').'
|
||||
</li>
|
||||
<li>'.$this->l('When you\'re done, click "Save."').'</li>
|
||||
<li>'.$this->l('Click on the "Shipping" menu.').'</li>
|
||||
<li>'.
|
||||
$this->l('You need to set the fees that will be applied for this carrier.').' '.
|
||||
$this->l('At the bottom on the page -- in the "Fees" section -- select the name of the carrier.').'
|
||||
</li>
|
||||
<li>'.$this->l('For each zone, enter a price and then click "Save."').'</li>
|
||||
<li>'.$this->l('You\'re all set! The new carrier will now be displayed to customers.').'</li>
|
||||
</ul>'
|
||||
);
|
||||
$this->_select = 'b.*';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'carrier_lang` b ON a.id_carrier = b.id_carrier'.Shop::addSqlRestrictionOnLang('b').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'carrier_tax_rules_group_shop` ctrgs ON (a.`id_carrier` = ctrgs.`id_carrier`
|
||||
@@ -696,6 +679,11 @@ class AdminCarriersControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function displayEditLink($token = null, $id, $name = null)
|
||||
{
|
||||
return '<a href="'.$this->context->link->getAdminLink('AdminCarrierWizard').'&id_carrier='.(int)$id.'"><img src="../img/admin/edit.gif"/></a>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user