Aviso restante para atingir o necessário p/ FRETE Grátis
Enviado: 07 Nov 2013, 12:25
Olá!
Estou tentando utilizar este módulo: http://www.opencart.com/index.php?route ... ifier-v2-1
Quando atinge o valor X configurado por mim na área administrativa, executa a função correta referente ao frete grátis, porém o texto que aparece é a variável:
text_freeshippingyes

Quando está faltando X para atingir o frete grátis:

Segue o código do XML:
Alguém sabe como resolver?
Aparecer as mensagens corretamente.
Obrigado pela atenção
Estou tentando utilizar este módulo: http://www.opencart.com/index.php?route ... ifier-v2-1
Quando atinge o valor X configurado por mim na área administrativa, executa a função correta referente ao frete grátis, porém o texto que aparece é a variável:
text_freeshippingyes

Quando está faltando X para atingir o frete grátis:

Segue o código do XML:
Código: Selecionar todos
Testei este também: http://www.opencart.com/index.php?route ... ifier-v2-1
<modification>
<id><![CDATA[free shipping qualifier-test]]></id>
<version><![CDATA[2.0]]></version>
<vqmver><![CDATA[2.1.7]]></vqmver>
<author><![CDATA[]]></author>
<file name="catalog/view/theme/*/template/checkout/cart.tpl">
<operation>
<search position="after" error="log"><![CDATA[<div class="cart-info">]]></search>
<add><![CDATA[<div class="<?php echo $div_class; ?>">
<?php if (isset($freeshippingnote)) {echo $freeshippingnote;} ?>
<img src="catalog/view/theme/*/image/close.png" alt="" class="close" />
</div> ]]></add>
</operation>
</file>
<file name="catalog/language/english/checkout/cart.php">
<operation>
<search position="after" error="log"><![CDATA[$_['text_empty'] = 'Your shopping cart is empty!';]]></search>
<add><![CDATA[$_['text_freeshippingno'] = 'The Sub-Total is <span style="color: #df1d2a;">%s</span>. Spend <span style="color: #df1d2a;">%s</span> more to be qualified for Free Shipping!';
$_['text_freeshippingyes'] = 'You are qualified for Free Shipping!';
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$_['text_success'] = 'Success: You have added <a href="%s">%s</a> to your <a href="%s">shopping cart</a>!';]]></search>
<add><![CDATA[$_['text_success'] = 'Success: You have added <a href="%s">%s</a> to your <a href="%s">shopping cart</a>! %s';]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/cart.php">
<operation>
<search position="after" error="log"><![CDATA[$this->data['button_checkout'] = $this->language->get('button_checkout');]]></search>
<add><![CDATA[if ($this->cart->getSubTotal() < $this->config->get('free_total')) {
$this->data['div_class'] = 'attention';
$addmoney = $this->config->get('free_total') - $this->cart->getSubTotal();
$this->data['freeshippingnote'] = sprintf($this->language->get('text_freeshippingno'),$this->currency->format($this->cart->getSubTotal()), $this->currency->format($addmoney));
}
else {
$this->data['div_class'] = 'success';
$this->data['freeshippingnote'] = $this->language->get('text_freeshippingyes');
}
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));]]></search>
<add><![CDATA[if ($this->cart->getSubTotal() < $this->config->get('free_total')) {
$addmoney = $this->config->get('free_total') - $this->cart->getSubTotal();
$freeshippingnote = sprintf($this->language->get('text_freeshippingno'),$this->currency->format($this->cart->getSubTotal()), $this->currency->format($addmoney));
}
else {
$freeshippingnote = $this->language->get('text_freeshippingyes');
}
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'),$freeshippingnote);]]></add>
</operation>
</file>
</modification>Código: Selecionar todos
E deu o mesmo erro.<modification>
<id>Add Free Shipping Alert</id>
<version>1</version>
<vqmver>2.3.2</vqmver>
<author>Andrei Bogdan (andrei.opencart@yahoo.com)</author>
<!-- template -->
<file name="catalog/view/theme/*/template/checkout/shipping_method.tpl">
<operation>
<search position="before"><![CDATA[<b><?php echo $text_comments; ?></b>]]></search>
<add><![CDATA[
<?php if ($alert) { ?>
<div class="attention">
<?php echo $alert; ?>
</div>
<?php } ?>
<?php if ($notify) { ?>
<div class="success">
<?php echo $notify; ?>
</div>
<?php } ?>
<br />
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/checkout/cart.tpl">
<operation>
<search position="before"><![CDATA[<div class="cart-total">]]></search>
<add><![CDATA[
<?php if ($alert) { ?>
<div class="attention">
<?php echo $alert; ?>
</div>
<?php } ?>
<?php if ($notify) { ?>
<div class="success">
<?php echo $notify; ?>
</div>
<?php } ?>
<br />
]]></add>
</operation>
</file>
<!-- language -->
<file name="catalog/language/english/checkout/checkout.php">
<operation>
<search position="after"><![CDATA[$_['text_checkout_shipping_method'] = 'Step 4: Delivery Method';]]></search>
<add><![CDATA[
$_['text_alert'] = 'You can enjoy Free Shipping for an ordered amount of at least <strong>%s</strong>.<br />You only need to order for <strong>%s</strong> more and you will qualify for Free Shipping!';
$_['text_notify'] = 'Your ordered amount is larger than <strong>%s</strong>.<br /> You are qualified for Free Shipping.';
]]></add>
</operation>
</file>
<file name="catalog/language/english/checkout/cart.php">
<operation>
<search position="after"><![CDATA[$_['heading_title'] = 'Shopping Cart';]]></search>
<add><![CDATA[
$_['text_alert'] = 'You can enjoy Free Shipping for an ordered amount of at least <strong>%s</strong>.<br />You only need to order for <strong>%s</strong> more and you will qualify for Free Shipping!';
$_['text_notify'] = 'Your ordered amount is larger than <strong>%s</strong>.<br /> You are qualified for Free Shipping.';
]]></add>
</operation>
</file>
<!-- controller -->
<file name="catalog/controller/checkout/cart.php">
<operation>
<search position="after"><![CDATA[
$this->data['totals'] = $total_data;
]]></search>
<add><![CDATA[
if( $this->cart->getSubTotal() < $this->config->get('free_total') ) {
$diff = (float)($this->config->get('free_total') - $this->cart->getSubTotal());
} else {
$diff = (float)($this->cart->getSubTotal() - $this->config->get('free_total'));
}
if ($this->cart->getSubTotal() < $this->config->get('free_total')) {
$this->data['notify'] = false;
$this->data['alert'] = sprintf( $this->language->get('text_alert'), $this->currency->format($this->config->get('free_total'),false,false), $this->currency->format($diff,false,false) );
} else {
$this->data['alert'] = false;
$this->data['notify'] = sprintf( $this->language->get('text_notify'), $this->currency->format($this->config->get('free_total'),false,false) );
}
]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/shipping_method.php">
<operation>
<search position="before"><![CDATA[
$this->data['button_continue'] = $this->language->get('button_continue');
]]></search>
<add><![CDATA[
if( $this->cart->getSubTotal() < $this->config->get('free_total') ) {
$diff = (float)($this->config->get('free_total') - $this->cart->getSubTotal());
} else {
$diff = (float)($this->cart->getSubTotal() - $this->config->get('free_total'));
}
if ($this->cart->getSubTotal() < $this->config->get('free_total')) {
$this->data['notify'] = false;
$this->data['alert'] = sprintf( $this->language->get('text_alert'), $this->currency->format($this->config->get('free_total'),false,false), $this->currency->format($diff,false,false) );
} else {
$this->data['alert'] = false;
$this->data['notify'] = sprintf( $this->language->get('text_notify'), $this->currency->format($this->config->get('free_total'),false,false) );
}
]]></add>
</operation>
</file>
</modification>Alguém sabe como resolver?
Aparecer as mensagens corretamente.
Obrigado pela atenção