mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-03 11:43:16 +03:00
bug fixes (#14)
This commit is contained in:
parent
b6f010f2fc
commit
226e88966b
@ -20,6 +20,7 @@ class RetailcrmReferences
|
|||||||
public function getDeliveryTypes()
|
public function getDeliveryTypes()
|
||||||
{
|
{
|
||||||
$deliveryTypes = array();
|
$deliveryTypes = array();
|
||||||
|
$apiDeliveryTypes = $this->getApiDeliveryTypes();
|
||||||
|
|
||||||
if (!empty($this->carriers)) {
|
if (!empty($this->carriers)) {
|
||||||
foreach ($this->carriers as $carrier) {
|
foreach ($this->carriers as $carrier) {
|
||||||
@ -29,7 +30,7 @@ class RetailcrmReferences
|
|||||||
'name' => 'RETAILCRM_API_DELIVERY[' . $carrier['id_carrier'] . ']',
|
'name' => 'RETAILCRM_API_DELIVERY[' . $carrier['id_carrier'] . ']',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'query' => $this->getApiDeliveryTypes(),
|
'query' => $apiDeliveryTypes,
|
||||||
'id' => 'id_option',
|
'id' => 'id_option',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
)
|
)
|
||||||
@ -43,8 +44,8 @@ class RetailcrmReferences
|
|||||||
public function getStatuses()
|
public function getStatuses()
|
||||||
{
|
{
|
||||||
$statusTypes = array();
|
$statusTypes = array();
|
||||||
|
|
||||||
$states = OrderState::getOrderStates($this->default_lang, true);
|
$states = OrderState::getOrderStates($this->default_lang, true);
|
||||||
|
$apiStatuses = $this->getApiStatuses();
|
||||||
|
|
||||||
if (!empty($states)) {
|
if (!empty($states)) {
|
||||||
foreach ($states as $state) {
|
foreach ($states as $state) {
|
||||||
@ -60,7 +61,7 @@ class RetailcrmReferences
|
|||||||
'name' => "RETAILCRM_API_STATUS[$key]",
|
'name' => "RETAILCRM_API_STATUS[$key]",
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'query' => $this->getApiStatuses(),
|
'query' => $apiStatuses,
|
||||||
'id' => 'id_option',
|
'id' => 'id_option',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
)
|
)
|
||||||
@ -76,6 +77,7 @@ class RetailcrmReferences
|
|||||||
{
|
{
|
||||||
$payments = $this->getSystemPaymentModules();
|
$payments = $this->getSystemPaymentModules();
|
||||||
$paymentTypes = array();
|
$paymentTypes = array();
|
||||||
|
$apiPaymentTypes = $this->getApiPaymentTypes();
|
||||||
|
|
||||||
if (!empty($payments)) {
|
if (!empty($payments)) {
|
||||||
foreach ($payments as $payment) {
|
foreach ($payments as $payment) {
|
||||||
@ -85,7 +87,7 @@ class RetailcrmReferences
|
|||||||
'name' => 'RETAILCRM_API_PAYMENT[' . $payment['code'] . ']',
|
'name' => 'RETAILCRM_API_PAYMENT[' . $payment['code'] . ']',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'query' => $this->getApiPaymentTypes(),
|
'query' => $apiPaymentTypes,
|
||||||
'id' => 'id_option',
|
'id' => 'id_option',
|
||||||
'name' => 'name'
|
'name' => 'name'
|
||||||
)
|
)
|
||||||
@ -137,7 +139,7 @@ public function getPaymentAndDeliveryForDefault()
|
|||||||
'name' => '',
|
'name' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($this->getSystemPaymentModules() as $valPayment) {
|
foreach ($paymentModules as $valPayment) {
|
||||||
$paymentTypes[$valPayment['id']] = array(
|
$paymentTypes[$valPayment['id']] = array(
|
||||||
'id_option' => $valPayment['code'],
|
'id_option' => $valPayment['code'],
|
||||||
'name' => $valPayment['name'],
|
'name' => $valPayment['name'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user