Post by Qphoria » Sat Aug 27, 2011 9:10 am

Johnathan wrote:
Qphoria wrote:Yea the installer doesn't check file permission on the index.php file. Jay. fix it!
JAY6390 wrote:I'd rather not use expletives to reply to that comment, so I'll simply say "do one, guvna"
You two sound like a (slightly odd) married couple. :laugh:
All that matters is that we're in love... with vQmod

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by 5ulo » Tue Aug 30, 2011 4:32 am

I have this in my mod for

Code: Select all

catalog/controller/account/order.php

Code: Select all

    <operation>
      <search position="replace" index="1">
      <![CDATA[ '{country}'; ]]>
      </search>
      <add><![CDATA[ '{country}' . "\n <br />" . (!empty($order_info['shipping_co_id']) ? $this->language->get('entry_co_id') . ' {co_id}' . "\n" .'':'') . (!empty($order_info['shipping_vat_id']) ? $this->language->get('entry_vat_id') . ' {vat_id}' . "\n" .'':''); // 5ulo       ]]></add>
    </operation>
    <operation>
      <search position="replace" index="2">
      <![CDATA[ '{country}'; ]]>
      </search>
      <add><![CDATA[ '{country}' . "\n <br />" . (!empty($order_info['payment_co_id']) ? $this->language->get('entry_co_id') . ' {co_id}' . "\n" .'':'') . (!empty($order_info['payment_vat_id']) ? $this->language->get('entry_vat_id') . ' {vat_id}' . "\n" .'':''); // 5ulo       ]]></add>
    </operation>  
The question is.. why is replaced ONLY the first index=1? Index 2 is ignored. Interresting is that when I put the second operation with index="2" before operation index="1", it works? Do I need use index backwards? Or what I'm doing wrong?
Thanks

CID, VAT ID / ICO, DIC (vQmod) for OC 1.5.x
Autofill SEO field (vQmod) for OC 1.4.x-1.5.x


User avatar
New member

Posts

Joined
Thu Oct 21, 2010 6:47 am
Location - Trnava, Slovakia, EU

Post by rph » Tue Aug 30, 2011 4:46 am

After the first replacement only one instance of "'{country}';" exists.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by 5ulo » Tue Aug 30, 2011 4:50 am

got it :) thanks rph!

CID, VAT ID / ICO, DIC (vQmod) for OC 1.5.x
Autofill SEO field (vQmod) for OC 1.4.x-1.5.x


User avatar
New member

Posts

Joined
Thu Oct 21, 2010 6:47 am
Location - Trnava, Slovakia, EU

Post by thisisworldwide » Thu Sep 01, 2011 4:11 am

So hang on, with vqMod I would be able to use several different extensions because they are all kept in their original seperate directories rather than over writing default core files etc?

For example if I want to run

customer group quantity discount extension
global mega options
and say a product option images extension

on the same store... i would be able to easier with vQmod installed rather than having to custom code all of the files (considering those extensions all edit the same core files for example cart or product.tpl)

thus allowing them to work together?

New member

Posts

Joined
Thu Jun 02, 2011 1:57 am

Post by JAY6390 » Thu Sep 01, 2011 4:17 am

As long as there are no conflicts between the code in any of those files then yes, in theory its totally possible. Note that you or the developer will require making the vqmod file

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Xsecrets » Thu Sep 01, 2011 6:07 am

however I would not get your hopes up all of the extensions you mentioned basically edit basically the exact same thing, and I'd be VERY surprised if there are not conflicts between them even using vqmod.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Thu Sep 01, 2011 11:06 am

Well customer group discount has nothing to do with options
But global mega options already has an option image so there is no need for the latter.

But yes, your understanding of vQMod is correct.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by thisisworldwide » Thu Sep 01, 2011 2:47 pm

can i still install vqmod after i've already installed some extensions or do i have to install it on a fresh install, then add my extensions

i know the latter is recommended probably but the clients store is already up and running and she isnt allowed another DB set up on her hosting account so i cant really create a new store for her and import the products/template on a fresh install with vqmod, etc.

New member

Posts

Joined
Thu Jun 02, 2011 1:57 am

Post by JAY6390 » Thu Sep 01, 2011 6:32 pm

You can do the latter just fine. be aware though that it won't magically undo your custom changes

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ninogui » Fri Sep 02, 2011 6:14 pm

Hello

I started using vqmod for 1511, thanks for making it available

I often get this on admin error log

- PHP Notice: Trying to get property of non-object in C:\Ampps\www\vapinshop\vqmod\vqmod.php on line 327

and on vqmod.php line 327 is

$add = $operation->getElementsByTagName('add')->item(0)->nodeValue;

incidentally this one line is the only on this group not having any () parameter

Although things seems to be working properly

what error do you think this relates to ?


thks

New member

Posts

Joined
Thu May 05, 2011 7:52 pm

Post by JAY6390 » Fri Sep 02, 2011 6:23 pm

Do you have any additional vqmod XML files installed except for the basic opencart one?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ninogui » Fri Sep 02, 2011 6:43 pm

Yes

Right now I have the uksb_view_basket_minicart.xml installed in the XML folder

what you make of this ?

New member

Posts

Joined
Thu May 05, 2011 7:52 pm

Post by JAY6390 » Fri Sep 02, 2011 7:30 pm

I'd suggest taking a look through the XML file and seeing if there is an <add> tag missing for a <search>. That would explain the error to be honest. note that nodeValue should not have braces after it as it's a property not a method of the class

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by ninogui » Fri Sep 02, 2011 7:37 pm

thks Jay

still a bit overwhelming for me though, since this vqmod is property of Simon (uksitebuilder) I´d rather have him take a look

best rgds

New member

Posts

Joined
Thu May 05, 2011 7:52 pm

Post by JAY6390 » Fri Sep 02, 2011 7:42 pm

Sure no problem

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Sat Sep 03, 2011 1:51 am

JAY6390 wrote:I'd suggest taking a look through the XML file and seeing if there is an <add> tag missing for a <search>.
Actually that should throw a DOM exception on the xml parser and throw an error in the vqmod.log file and revert to the non-modded files.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by uksitebuilder » Sat Sep 03, 2011 1:57 am

ninogui wrote:Yes

Right now I have the uksb_view_basket_minicart.xml installed in the XML folder

what you make of this ?
ninogui wrote:thks Jay

still a bit overwhelming for me though, since this vqmod is property of Simon (uksitebuilder) I´d rather have him take a look

best rgds
tested on 1.5.0.5 and 1.5.1.1

Seems to be fine

Here's the contents - It's a free mod so..

Code: Select all

<modification>
	<id>View Cart MiniCart</id>
	<version>1.0</version>
	<vqmver>1.2.3</vqmver>
	<author>uksb</author>
	<file name="catalog/language/english/english.php">
		<operation>
			<search position="replace"><![CDATA[$_['button_checkout']       = 'Checkout';]]></search>
			<add><![CDATA[$_['button_checkout']       = 'Checkout';
$_['button_viewcart']       = 'View Cart';]]></add>
		</operation>
	</file>
	<file name="catalog/controller/checkout/cart.php">
		<operation>
			<search position="replace" index="2"><![CDATA[		$this->data['button_checkout'] = $this->language->get('button_checkout');]]></search>
			<add><![CDATA[$this->data['button_viewcart'] = $this->language->get('button_viewcart');
		$this->data['button_checkout'] = $this->language->get('button_checkout');]]></add>
		</operation>
		<operation>
			<search position="replace" index="2"><![CDATA[		$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');]]></search>
			<add><![CDATA[$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
		$this->data['cart'] = $this->url->link('checkout/cart', '');]]></add>
		</operation>
	</file>
	<file name="catalog/view/theme/default/template/common/cart.tpl">
		<operation>
			<search position="replace"><![CDATA[<div class="checkout"><a href="<?php echo $checkout; ?>" class="button"><span><?php echo $button_checkout; ?></span></a></div>]]></search>
			<add><![CDATA[<div class="checkout"><a href="<?php echo $cart; ?>" class="button"><span><?php echo $button_viewcart; ?></span></a> <a href="<?php echo $checkout; ?>" class="button"><span><?php echo $button_checkout; ?></span></a></div>]]></add>
		</operation>
	</file>
</modification>

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by affect » Sun Sep 04, 2011 3:01 am

I've been trying to find out why do I get blank pages instead of errors sometimes although I have error_reporting and display_errors set correctly everywhere.

The only place where error_reporting was set to 0 was vqmod.php in searchDataForString() function, although it looked like it got reset to old value later.

After some more debugging I realized it only reverts the setting back to original when the search term is found ( if($searchCount > 0) ). If the foreach($fileLines as $line) loop ends and no term is found, the function finishes with error_reporting still set to 0. Then next time the function gets called the $old_error gets overwritten with 0, it's original value is lost and error_reporting gets disabled permanently.

If I'm right, the correct approach would be to add error_reporting($old_error); after the foreach() loop and before the end of the function so it also gets executed if the loop finishes and no matches are found.

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by uksitebuilder » Sun Sep 04, 2011 3:06 am

might be that you have compression enabled.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom
Who is online

Users browsing this forum: No registered users and 13 guests