Post by tstirler » Tue Mar 06, 2018 6:32 pm

Hey.
I'm running an OC3 (3.0.2.0) site with vqmod and I need to remove the no-tax price from the page.
I'd do this in Theme Editor except that I have a mod that gives custom image titles, and that won't work with Theme editor.

Problem is that this search works just fine on my (local) test site, but not on the live site. Both with all same config and mods.

Code: Select all

<file name="catalog/view/theme/*/template/product/product.twig">
<operation info="Remove no-tax-price product page">
	<search position="replace"><![CDATA[
		<li>{{ text_tax }} {{ tax }}</li>
	]]></search>
	<add><![CDATA[
		<!-- TaxPrice -->
	]]></add>
</operation>
Any tips for why this won't work on live site, but does on test?
log file on live site gives this:
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD)

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 6:41 pm

open from ftp the file catalog/view/theme/*/template/product/product.twig
and search for "<li>{{ text_tax }} {{ tax }}</li>"
you will find it in line 147
if you dont fint it search for "{% if tax %}" its one line above

if this text exists then ... we will get a solution in next post
--
other way is to run this in ocmod file

Code: Select all

<file name="catalog/controller/product/product.php">
<operation info="Remove no-tax-price product page">
	<search position="before"><![CDATA[
		$this->response->setOutput($this->load->view('product/product', $data));
	]]></search>
	<add><![CDATA[
		$data['tax'] = null;
	]]></add>
</operation>
Last edited by Wid on Tue Mar 06, 2018 6:52 pm, edited 2 times in total.

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 6:48 pm

yes, I can find no problem. So can I (and vqmod) on the test site.

But vqmod still doesn't on the live site...

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 6:57 pm

the log from admin panel > modifications >
Modification List tab "log"
what exactly it says?
plz paste it here:
for example something like this
FILE: catalog/view/theme/oc-light/template/product/search.twig
CODE: button_cart
LINE: 144
CODE: onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"
NOT FOUND - OPERATIONS ABORTED!
----------------------------------------------------------------

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by Wid » Tue Mar 06, 2018 7:02 pm

this module does what you want without ocmod,
so it will work if you dont solve this problem
Hide ex Tax EN-GR oc3.x

this module is better because it removes without-tax-price from related products and from category too
Last edited by Wid on Tue Mar 06, 2018 7:47 pm, edited 1 time in total.

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 7:46 pm

That log sadly isn't timestamped, and from what I can see only contains install-info. No error for anything I'm looking for here that I can see.
The only error for this problem was in the vqmod log-file.

The mod isn't in question right now, but rather why vqmod fails.

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by tstirler » Tue Mar 06, 2018 7:50 pm

Also, while that mod you linked may solve my issue, it does not solve my problem. And that is finding out why my vqmod search fails.
If I can figure that out, then I'll be able to solve similar issues at a later time. :)

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 7:52 pm

change the name of the file as install.xml
and put it on a zip with this name yourname.ocmod.zip
and install it from admin panel> extentions > installer

then go to extentions>modifications and refresh modifications from refresh button at the right top of the page
go to log tab and look the 5 last lines of it

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 8:01 pm

Not sure what you're trying to do here. vqmod and ocmod are two different formats, and I can't just mix it up like that.
A script for vqmod has nowhere to go in the installer.

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 8:12 pm

vqmod and ocmod is similar but ocmod is build in oc3 so it is better solution.
if it doesn't work with ocmod then you will restrict possible mistakes, maybe it is file rights of the product.twig file or file format of the xml file

you can upload here the xml file so as to check it on my server

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 8:19 pm

This is literally the entire script. nothing fancy really.

I'll look into writing for ocmod instead, but the simplicity of vqmod has me hooked. ;)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification
			xmlns="https://github.com/vqmod/vqmod"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xsi:schemaLocation="https://github.com/vqmod/vqmod https://raw.githubusercontent.com/vqmod/vqmod/master/vqmod.xsd">
	<id>Remove taxed price when showing taxed and not taxed in store.</id>
	<version>1.1</version>
	<vqmver>2.X</vqmver>
	<author>Stirler</author>
	<file name="catalog/view/theme/*/template/product/product.twig">
		<operation info="Remove no-tax-price product page">
			<search position="replace"><![CDATA[
			<li>{{ text_tax }} {{ tax }}</li>
			]]></search>
			<add><![CDATA[
			<!-- TaxPrice -->
			]]></add>
		</operation>
	</file>
</modification>

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 8:27 pm

ocmod:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <name>Hide exTax for Opencart 3.x </name>
    <version>1.0.1</version>
    <code>opencart_extax</code>
    <author>you</author>
    <link></link>
	<file path="catalog/view/theme/*/template/product/product.twig">
		<operation>
			<search><![CDATA[
				<li>{{ text_tax }} {{ tax }}</li>
			]]></search>
			<add position="replace"><![CDATA[<!-- TaxPrice -->]]></add>
		</operation>
	</file>
</modification>

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by Wid » Tue Mar 06, 2018 8:29 pm

try to change this lines
<search position="replace"><![CDATA[
<li>{{ text_tax }} {{ tax }}</li>
]]></search>
to
<search position="replace"><![CDATA[<li>{{ text_tax }} {{ tax }}</li>]]></search>

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 8:58 pm

Awesome. I'll give this a shot.
Can you nest operations just like in vq as well (within the same file-tag)?

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm

Post by Wid » Tue Mar 06, 2018 9:01 pm

yes, you mean something like this:

Code: Select all

<file path="catalog/view/theme/*/template/product/*.twig">
	<operation>
		<search><![CDATA[
			button_cart
		]]></search>
		<add position="replace"><![CDATA[product.button_cart]]></add>
	</operation>
	<operation>
		<search><![CDATA[onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"]]></search>
		<add position="replace"><![CDATA[id="button-cart-{{ product.product_id }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"]]></add>
	</operation>
	<operation>
		<search><![CDATA[class="image"]]></search>
		<add position="replace"><![CDATA[class="image" id="image-{{ product.product_id }}"]]></add>
	</operation>
</file>

take a visit to My Modules !


Wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by tstirler » Tue Mar 06, 2018 10:10 pm

Yes, exactly like that.
Good to know. :)

______________________________
Out of my mind. Back in five minutes.


User avatar
Newbie

Posts

Joined
Tue Feb 06, 2018 5:22 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 41 guests