Fórum OpenCart Brasil

Por um e-commerce livre, confiável e profissional

Suporte para extensões de Formas de Envio
#57658
Eu estava com o mesmo erro nesse modulo.
Mas o meu erro era no arquivo product.php em admin\model\catalog\

Dando umas googladas.. achei varias informacoes.
E uma delas me fez abrir esse arquivo (product.php) e fiz uma busca por shipping
apareceram 4 itens
Na linha 4, 2 itens
Código: Selecionar todos
$this->db->query("INSERT INTO " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', ean = '" . $this->db->escape($data['ean']) . "', jan = '" . $this->db->escape($data['jan']) . "', isbn = '" . $this->db->escape($data['isbn']) . "', mpn = '" . $this->db->escape($data['mpn']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . $this->db->escape($data['tax_class_id']) . "', sort_order = '" . (int)$data['sort_order'] . "', date_added = NOW()");
E na linha 127, mais 2 itens
Código: Selecionar todos
$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', ean = '" . $this->db->escape($data['ean']) . "', jan = '" . $this->db->escape($data['jan']) . "', isbn = '" . $this->db->escape($data['isbn']) . "', mpn = '" . $this->db->escape($data['mpn']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . $this->db->escape($data['tax_class_id']) . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
O que eu fiz foi, pegar a parte onde aparece na linha 4

shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] .

E adicionei entre shipping e price .. shipping_free = '" . $this->db->escape($data['shipping_free']) . "',

Ficando assim
Código: Selecionar todos
 shipping = '" . (int)$data['shipping'] . "', shipping_free = '" . $this->db->escape($data['shipping_free']) . "', price = '" . (float)$data['price'] 
.


E na linha 127

shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "',

Eu adicionei , shipping_free = '" . (int)$data['shipping_free'] . "' entre shipping e price
Ficando assim
Código: Selecionar todos
 shipping = '" . (int)$data['shipping'] . "', shipping_free = '" . (int)$data['shipping_free'] . "', price = '" . (float)$data['price'] .
Bom, eu nao tive mais nenhum erro depois disso.
Abs a todos
#63609
Boa tarde, Veterano. Utilizo o opencart 2.1.0.1 no tem default2 e aparece a seguinte mensagem ao finalizar o pedido em detalhes do frete:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK

<b>Notice</b>: Undefined index: comment in <b>/home/cieprom/www/shop/catalog/controller/checkout/shipping_method.php</b> on line <b>131</b>

Pode me ajudar?
#63610
Boa tarde, Veterano. Utilizo o opencart 2.1.0.1 no tem default2 e aparece a seguinte mensagem ao finalizar o pedido em detalhes do frete:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK

<b>Notice</b>: Undefined index: comment in <b>/home/cieprom/www/shop/catalog/controller/checkout/shipping_method.php</b> on line <b>131</b>

Pode me ajudar?
#63611
veteranodf escreveu:Deve ser bug do módulo mesmo ou alguma modificação que o mesmo sofreu;

Boa tarde, Veterano. Utilizo o opencart 2.1.0.1 no tema default2 e aparece a seguinte mensagem ao finalizar o pedido em detalhes do frete:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK

<b>Notice</b>: Undefined index: comment in <b>/home/cieprom/www/shop/catalog/controller/checkout/shipping_method.php</b> on line <b>131</b>

Pode me ajudar?

Gente preciso de ajuda urgente. Na migraç&a[…]

Caro @reds , muito obrigado pela resposta.

PHP 8+ incompatibilidade

Toda tradução para a versão 3[…]

Ola @alex3257 Se você precisa apenas ver […]