Community Forums

[MOD] - VirtualQMod "vQmod" Virtual File Modification System

Community created contributions & mods for OpenCart 1.x

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby madimar » Wed Jun 08, 2011 2:03 pm

Q, I think I found another little issue with vqmod. Fortunately it can be solved.
I've been working to some vqmod on languages files, using languages like spanish, french, german, etc. where a lot of "non ASCII" characters are present: è, ò, é, à, etc.

Doing this, I've been struggling with vqmod, becauase it seems that DOMDocument::load function you use to load xml file has some issues with encoded characters. I'm referring specifically to:

Code: Select all
           
 $dom = new DOMDocument('1.0', 'UTF-8');
$dom->load($modfile);


in
private function getFilesToMod($modfile)

It is sufficient there is only one non ASCII character in the xml file to cause this strange effect: no errors, no log, no action...

I solved, replacing all possible non ASCII characters with right text encoding, e.g.:

à with à

etc.

thanks in advance,

Massimo
User avatar
madimar
 
Posts: 1023
Joined: Thu Sep 24, 2009 10:27 am

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby niffirg » Thu Jun 09, 2011 3:30 am

5ulo wrote:As I wrote, it is fresh install, so there is only one template - default. I tried this again.. downloaded fresh copy of OC150, extracted, chmoded, installed, installed vqmod and copied the test xml shown above - without success.
Tried also on admin/view/template/common/footer.tpl.. it was the same as above... vqcache is generated but not showing.
There is OC1495 on my localhost and the mod is working like a charm on it.



I'm having the same issue. Using 1.5.0.3 and re-downloaded vqmod 1.1 like you mentioned. Fresh install, fresh DB running on xampp. cache looks good, but I can't see the actual changes. Any help is appreciated.
niffirg
 
Posts: 2
Joined: Thu Jun 09, 2011 3:24 am

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby cantykiwi » Thu Jun 09, 2011 5:28 am

niffirg wrote:
5ulo wrote:As I wrote, it is fresh install, so there is only one template - default. I tried this again.. downloaded fresh copy of OC150, extracted, chmoded, installed, installed vqmod and copied the test xml shown above - without success.
Tried also on admin/view/template/common/footer.tpl.. it was the same as above... vqcache is generated but not showing.
There is OC1495 on my localhost and the mod is working like a charm on it.



I'm having the same issue. Using 1.5.0.3 and re-downloaded vqmod 1.1 like you mentioned. Fresh install, fresh DB running on xampp. cache looks good, but I can't see the actual changes. Any help is appreciated.


Ditto, same problem on fresh install and re-downloaded vqmod 1.1.
cantykiwi
 
Posts: 63
Joined: Mon Sep 13, 2010 4:37 am

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby JAY6390 » Thu Jun 09, 2011 11:46 am

For those that seem to be having the issues with not seeing it, try downloading the attached file, and replacing your file in the vqmod/xml folder

This should fix it 8)

File Deleted by Qphoria. This was already fixed last week. Just redownload the 1.1.0 zip again to avoid having 2 copies of the core script
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby 5ulo » Thu Jun 09, 2011 11:59 am

It seems to work.. big thanks! This xml should appear in official vqmod package ;)
User avatar
5ulo
 
Posts: 69
Joined: Wed Oct 20, 2010 10:47 pm
Location: Trnava, Slovakia, EU

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby JAY6390 » Thu Jun 09, 2011 12:04 pm

I'm sure it will in the next version ;)
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Thu Jun 09, 2011 1:59 pm

JAY6390 wrote:For those that seem to be having the issues with not seeing it, try downloading the attached file, and replacing your file in the vqmod/xml folder

This should fix it 8)


This was already addressed and fixed last week:
viewtopic.php?f=23&t=24529&start=440#p161313

Just redownload the 1.1.0 version again
..jeez.. where you guys been.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Thu Jun 09, 2011 11:28 pm

Negative.Try it again..this has been confirmed fixed. You need to be sure you get the vqmod_opencart.xml file that comes with 1.1.0
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Julio Cesar C G » Fri Jun 10, 2011 2:07 pm

OpenCart 1.5 and vQmod 1.1.0:

Some files are not processed. They are ignored with no errors in the log. There is no caching of these files in the folder vcache ignored, obviously:

2011-06-10 14:02:06.2244890 - C:/wamp/www/oc150/admin/controller/catalog/product.php
2011-06-10 14:02:06.2245000 - C:/wamp/www/oc150/admin/language/english/catalog/product.php
2011-06-10 14:02:06.2245140 - C:/wamp/www/oc150/admin/model/catalog/product.php
2011-06-10 14:02:06.2245340 - C:/wamp/www/oc150/admin/view/template/catalog/product_form.tpl
2011-06-10 14:02:06.2245510 - C:/wamp/www/oc150/catalog/controller/product/product.php
2011-06-10 14:02:06.2245700 - C:/wamp/www/oc150/catalog/controller/checkout/cart.php
2011-06-10 14:02:06.2245870 - C:/wamp/www/oc150/catalog/language/english/product/product.php
2011-06-10 14:02:06.2246010 - C:/wamp/www/oc150/catalog/model/catalog/product.php
2011-06-10 14:02:06.2246130 - C:/wamp/www/oc150/catalog/view/theme/default/template/product/product.tpl
2011-06-10 14:02:06.2246250 - C:/wamp/www/oc150/system/startup.php
2011-06-10 14:02:06.2246360 - C:/wamp/www/oc150/system/engine/controller.php
2011-06-10 14:02:06.2246470 - C:/wamp/www/oc150/system/engine/front.php
2011-06-10 14:02:06.2246580 - C:/wamp/www/oc150/system/engine/loader.php
2011-06-10 14:02:06.2246680 - C:/wamp/www/oc150/system/library/language.php

help, please.
AIDC Products (Brazil only): http://www.itdirect.com.br
AIDC Products (Brazil only): http://www.barcodeshop.com.br
Zebra printers (Brazil only): http://www.zebrashop.com.br
Dino-Lite Digital Microscope (Brazil only): http://www.dinoliteshop.com.br
Thermal printers (Brazil only): http://www.impressorastermicas.com.br
User avatar
Julio Cesar C G
 
Posts: 55
Joined: Mon Oct 18, 2010 4:36 pm

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Xsecrets » Fri Jun 10, 2011 3:18 pm

I'm not sure what's up with the logging in 1.5, but I had the same issue, and it was an error in one of my xml files. I just removed stuff till I saw it start working then looked to see where the problem was, but you are correct. It seems that on 1.5 if it runs into an error the logger just stops, and doesn't log anything from there forward.
Xsecrets
 
Posts: 5042
Joined: Sat Oct 24, 2009 7:51 pm
Location: FL US

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Julio Cesar C G » Fri Jun 10, 2011 5:28 pm

Xsecrets wrote:I'm not sure what's up with the logging in 1.5, but I had the same issue, and it was an error in one of my xml files. I just removed stuff till I saw it start working then looked to see where the problem was, but you are correct. It seems that on 1.5 if it runs into an error the logger just stops, and doesn't log anything from there forward.


It really was a problem with my xml. The vqmod not find the string and ignore the file, but did not report this in the log.

Thanks.
AIDC Products (Brazil only): http://www.itdirect.com.br
AIDC Products (Brazil only): http://www.barcodeshop.com.br
Zebra printers (Brazil only): http://www.zebrashop.com.br
Dino-Lite Digital Microscope (Brazil only): http://www.dinoliteshop.com.br
Thermal printers (Brazil only): http://www.impressorastermicas.com.br
User avatar
Julio Cesar C G
 
Posts: 55
Joined: Mon Oct 18, 2010 4:36 pm

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Fri Jun 10, 2011 8:26 pm

^^

This is something I tried to fix in 1.1.0 but found it too quirky so I'll have to revisit it in 2.0

it isn't that vQmod isn't logging it.. it is that an ajax callback is overwriting the original log.

vQmod executes whenever the index.php file is loaded.
For example, If you load the product page, a few things happen...
1. The product controller loads the main page
2. The main page has an ajax call to load the reviews

So step 1 loads any mods on the product controller file and write it all to the log..
a split second later, step 2 loads any mods on the review function and overwrites the log file, so the log won't show the product page changes or header changes, etc so it looks like they weren't executed. Additionally there is some xml error catching that gets added to the log for bad xml, but that gets overwritten as well.

This has always been there in 1.4.x too, but if your weren't paying attention to the logs, you likely wouldn't have noticed.

In vQmod2.0 I am going to have multiple logs in their own logs folder that can handle multiple page callbacks and loads to avoid this issue. I am actually going to try to revamp the logging process to make it more reader friendly as well.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby JAY6390 » Fri Jun 10, 2011 8:44 pm

Would log files that are named the current date and time (including microseconds) be a better way to handle it then? The probability of the logs being written twice to the exact same name, and perhaps having an IP filtering of some sort, so that vQmod only runs the logging when it is a certain user making the scripts execute, to limit your log files going nuts and filling up your web space
ImageImageImage

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links


Image
User avatar
JAY6390
 
Posts: 4639
Joined: Wed May 26, 2010 3:47 pm
Location: United Kingdom

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby qahar » Sat Jun 11, 2011 7:52 pm

Qphoria wrote:UPDATED FIRST POST!

v1.1.0 - 2011-JUN-01 - Qphoria@gmail.com

I was monitor your vqmod.com and hope to see the vqmod upgrade for 1.5, then I was notice that it's already updated 10 days ago.. :choke: :P
thanks Q :D
My product: Opencart Blog Manager Free System Information
OpencartNews - News, Tutorial n Tips - Common OpenCart Errors and How to Solve Them
Don't forget to add [SOLVED] to your Thread Title (first post), if your issue is solved.
User avatar
qahar
 
Posts: 1650
Joined: Tue Jun 29, 2010 2:24 pm
Location: Indonesia

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Sat Jun 11, 2011 9:32 pm

JAY6390 wrote:Would log files that are named the current date and time (including microseconds) be a better way to handle it then? The probability of the logs being written twice to the exact same name, and perhaps having an IP filtering of some sort, so that vQmod only runs the logging when it is a certain user making the scripts execute, to limit your log files going nuts and filling up your web space


I had a few ideas that I tried
- appending the same log if the updates were within 10 secs. But the waythe current logging is, it is just confusing, and if you loaded a page that takes 5 secs to load.. then when there is 2 secs left of the 10 sec timer, the next 10 sec session would end up overwriting the log anyway so that wasn't working.
- appending the $_SERVER['REQUEST_URL'] to the filename so you knew exactly what page was loading. This worked "ok" but the names were quite long depending on the url and wasn't in the mood to create a cleanup process as there could be a log for every single controller or callback which would result in a lot of logs.
- Creating a new log with a number on the end, similar to the first idea, but instead of appending, just create vqmod1.log, vqmod2.log, vqmod3.log if the class was called within the same 10 seconds. Then overwrite from the start so you'd likely never go higher than vqmod5.log

Timestamp and IP might be good... maybe a new log for each minute.. and auto clean so that no more than 10 logs can exist.

In the next version I was planning on changing the logging to be cleaner. Like one or two lines for each operation to make it easier to read just cleaner overall.. that might make the choice of using multiple logs easier. But open to any ideas.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Sat Jun 11, 2011 9:33 pm

qahar wrote:
Qphoria wrote:UPDATED FIRST POST!

v1.1.0 - 2011-JUN-01 - Qphoria@gmail.com

I was monitor your vqmod.com and hope to see the vqmod upgrade for 1.5, then I was notice that it's already updated 10 days ago.. :choke: :P
thanks Q :D

Yea there was some strangeness going on with a realpath check that I wasn't sure about so I didn't add it to vqmod.com but now I've worked it out so I will add it there.
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby hellogoodbye » Sun Jun 12, 2011 8:06 pm

I can confirm that this solved the problem. Thanks! The post needs a "Thanks" button

Maybe include it in the doc file if others have this problem?

Qphoria wrote:Ok.. if you are getting "Internal Server Error 500" while trying to use the vqmod installer, this is because your host is not running php as phpsuexec, which means that you need to set the vqmod folder to 755 instead of 777. If you use 777, it causes ISE 500. That goes for any folder or file, not just limited to vqmod's files.
hellogoodbye
 
Posts: 50
Joined: Tue May 03, 2011 10:33 pm

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby uksitebuilder » Mon Jun 13, 2011 8:38 pm

I'm having a problem in 1.5.0.4 using vQmod 1.10

I have a couple of xml files working fine.

But the following does not. it creates the cache files, but they exactly match the originals and I can't for the life of me understand why.

Code: Select all
<modification>
   <id>Contact Form Extra</id>
   <version>1.0</version>
   <vqmver>1.1.0</vqmver>
   <author>uksb</author>
   <file name="catalog\view\theme\default\template\information\contact.tpl">
      <operation>
         <search position="after"><![CDATA[
    <h2><?php echo $text_contact; ?></h2>
         ]]></search>
         <add trim="true"><![CDATA[
    <!-- start contact mod by UKSB //-->
    <?php echo $text_required; ?>
    <!-- end contact mod by UKSB //-->
         ]]></add>
      </operation>
      <operation>
         <search position="after" index="5"><![CDATA[
<?php } ?>
         ]]></search>
         <add trim="true"><![CDATA[
    <!-- start contact mod by UKSB //-->
    <br />
    <b><?php echo $entry_phone; ?></b><br />
    <input type="text" name="phone" value="<?php echo $phone; ?>" />
    <br />
    <br />
    <b><?php echo $entry_subject; ?></b><br />
    <input type="text" name="subject" value="<?php echo $subject; ?>" style="width:200px;" />
    <br />
    <?php if ($error_subject) { ?>
    <span class="error"><?php echo $error_subject; ?></span>
    <?php } ?>
    <!-- end contact mod by UKSB //-->
         ]]></add>
      </operation>
   </file>
   <file name="catalog\language\english\information\contact.php">
      <operation>
         <search position="all"><![CDATA[
<?php
         ]]></search>
         <add trim="true"><![CDATA[
<?php
// Heading
$_['heading_title']  = 'Contact Us';

// Text
$_['text_location']  = 'Our Location';
$_['text_contact']   = 'Contact Form';
//start contact mod by UKSB
$_['text_required']  = '<p>Fields marked with <span class="required">*</span> are required!</p>';
//end contact mod by UKSB
$_['text_address']   = 'Address:';
$_['text_email']     = 'E-Mail:';
$_['text_telephone'] = 'Telephone:';
$_['text_fax']       = 'Fax:';
$_['text_message']   = '<p>Your enquiry has been successfully sent to the store owner!</p>';

//start contact mod by UKSB
// Entry Fields
$_['entry_name']     = 'Name:<span class="required">*</span>';
$_['entry_email']    = 'E-Mail Address:<span class="required">*</span>';
$_['entry_phone']    = 'Telephone:';
$_['entry_subject']  = 'Subject:<span class="required">*</span>';
$_['entry_enquiry']  = 'Enquiry:<span class="required">*</span>';
$_['entry_captcha']  = 'Enter the code in the box below:<span class="required">*</span>';
//end contact mod by UKSB

// Email
$_['email_subject']  = 'Website Enquiry: %s';

// Errors
$_['error_name']     = 'Name must contain more than 2 characters!';
$_['error_email']    = 'E-Mail Address does not appear to be valid!';
//start contact mod by UKSB
$_['error_subject']  = 'Subject must contain more than 5 characters!';
//end contact mod by UKSB
$_['error_enquiry']  = 'Enquiry must be between 10 and 3000 characters!';
$_['error_captcha']  = 'Verification code does not match the image!';
?>
         ]]></add>
      </operation>
   </file>
   <file name="catalog\controller\information\contact.php">
      <operation>
         <search position="all"><![CDATA[
<?php
         ]]></search>
         <add><![CDATA[
<?php
class ControllerInformationContact extends Controller {
   private $error = array();
      
     public function index() {
      $this->language->load('information/contact');

       $this->document->setTitle($this->language->get('heading_title')); 
   
       if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
         $mail = new Mail();
         $mail->protocol = $this->config->get('config_mail_protocol');
         $mail->parameter = $this->config->get('config_mail_parameter');
         $mail->hostname = $this->config->get('config_smtp_host');
         $mail->username = $this->config->get('config_smtp_username');
         $mail->password = $this->config->get('config_smtp_password');
         $mail->port = $this->config->get('config_smtp_port');
         $mail->timeout = $this->config->get('config_smtp_timeout');            
         $mail->setTo($this->config->get('config_email'));
           $mail->setFrom($this->request->post['email']);
           $mail->setSender($this->request->post['name']);
         //start contact mod by UKSB
           $mail->setSubject(sprintf($this->language->get('email_subject'), $this->request->post['subject']));
         $emailmessage =
            "Name: ".$this->request->post['name'].
            "\nEmail: ".$this->request->post['email'].
            ($this->request->post['phone']!=''?"\nTelephone".$this->request->post['phone']:"").
            "\n\n".$this->request->post['enquiry'].
            "\n\n----------------------------------------\n\nSender's IP Address: ".$_SERVER['REMOTE_ADDR'];
           $mail->setText(strip_tags(html_entity_decode($emailmessage, ENT_QUOTES, 'UTF-8')));
         //end contact mod by UKSB
            $mail->send();

           $this->redirect($this->url->link('information/contact/success'));
       }

         $this->data['breadcrumbs'] = array();

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('text_home'),
         'href'      => $this->url->link('common/home'),           
           'separator' => false
         );

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('heading_title'),
         'href'      => $this->url->link('information/contact'),
           'separator' => $this->language->get('text_separator')
         );   
         
       $this->data['heading_title'] = $this->language->get('heading_title');

       $this->data['text_location'] = $this->language->get('text_location');
      $this->data['text_contact'] = $this->language->get('text_contact');
      $this->data['text_required'] = $this->language->get('text_required');
      $this->data['text_address'] = $this->language->get('text_address');
       $this->data['text_telephone'] = $this->language->get('text_telephone');
       $this->data['text_fax'] = $this->language->get('text_fax');

       $this->data['entry_name'] = $this->language->get('entry_name');
       $this->data['entry_email'] = $this->language->get('entry_email');
       //start contact mod by UKSB
      $this->data['entry_phone'] = $this->language->get('entry_phone');
       $this->data['entry_subject'] = $this->language->get('entry_subject');
       //end contact mod by UKSB
       $this->data['entry_enquiry'] = $this->language->get('entry_enquiry');
      $this->data['entry_captcha'] = $this->language->get('entry_captcha');

      if (isset($this->error['name'])) {
          $this->data['error_name'] = $this->error['name'];
      } else {
         $this->data['error_name'] = '';
      }
      
      if (isset($this->error['email'])) {
         $this->data['error_email'] = $this->error['email'];
      } else {
         $this->data['error_email'] = '';
      }      
      
      //start contact mod by UKSB
      if (isset($this->error['subject'])) {
         $this->data['error_subject'] = $this->error['subject'];
      } else {
         $this->data['error_subject'] = '';
      }      
      //end contact mod by UKSB
      
      if (isset($this->error['enquiry'])) {
         $this->data['error_enquiry'] = $this->error['enquiry'];
      } else {
         $this->data['error_enquiry'] = '';
      }      
      
       if (isset($this->error['captcha'])) {
         $this->data['error_captcha'] = $this->error['captcha'];
      } else {
         $this->data['error_captcha'] = '';
      }   

       $this->data['button_continue'] = $this->language->get('button_continue');
   
      $this->data['action'] = $this->url->link('information/contact');
      $this->data['store'] = $this->config->get('config_name');
       $this->data['address'] = nl2br($this->config->get('config_address'));
       $this->data['telephone'] = $this->config->get('config_telephone');
       $this->data['fax'] = $this->config->get('config_fax');
       
      if (isset($this->request->post['name'])) {
         $this->data['name'] = $this->request->post['name'];
      } else {
         $this->data['name'] = '';
      }

      if (isset($this->request->post['email'])) {
         $this->data['email'] = $this->request->post['email'];
      } else {
         $this->data['email'] = '';
      }
      
      //start contact mod by UKSB
      if (isset($this->request->post['phone'])) {
         $this->data['phone'] = $this->request->post['phone'];
      } else {
         $this->data['phone'] = '';
      }
      
      if (isset($this->request->post['subject'])) {
         $this->data['subject'] = $this->request->post['subject'];
      } else {
         $this->data['subject'] = '';
      }
      //end contact mod by UKSB
      
      if (isset($this->request->post['enquiry'])) {
         $this->data['enquiry'] = $this->request->post['enquiry'];
      } else {
         $this->data['enquiry'] = '';
      }
      
      if (isset($this->request->post['captcha'])) {
         $this->data['captcha'] = $this->request->post['captcha'];
      } else {
         $this->data['captcha'] = '';
      }      

      if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/contact.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/information/contact.tpl';
      } else {
         $this->template = 'default/template/information/contact.tpl';
      }
      
      $this->children = array(
         'common/column_left',
         'common/column_right',
         'common/content_top',
         'common/content_bottom',
         'common/footer',
         'common/header'
      );
            
       $this->response->setOutput($this->render());      
     }

     public function success() {
      $this->language->load('information/contact');

      $this->document->setTitle($this->language->get('heading_title'));

         $this->data['breadcrumbs'] = array();

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('text_home'),
         'href'      => $this->url->link('common/home'),
           'separator' => false
         );

         $this->data['breadcrumbs'][] = array(
           'text'      => $this->language->get('heading_title'),
         'href'      => $this->url->link('information/contact'),
           'separator' => $this->language->get('text_separator')
         );   
      
       $this->data['heading_title'] = $this->language->get('heading_title');

       $this->data['text_message'] = $this->language->get('text_message');

       $this->data['button_continue'] = $this->language->get('button_continue');

       $this->data['continue'] = $this->url->link('common/home');

      if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) {
         $this->template = $this->config->get('config_template') . '/template/common/success.tpl';
      } else {
         $this->template = 'default/template/common/success.tpl';
      }
      
      $this->children = array(
         'common/column_left',
         'common/column_right',
         'common/content_top',
         'common/content_bottom',
         'common/footer',
         'common/header'
      );
            
       $this->response->setOutput($this->render());
   }

   public function captcha() {
      $this->load->library('captcha');
      
      $captcha = new Captcha();
      
      $this->session->data['captcha'] = $captcha->getCode();
      
      $captcha->showImage();
   }
   
     private function validate() {
       if ((strlen(utf8_decode($this->request->post['name'])) < 3)) {
            $this->error['name'] = $this->language->get('error_name');
       }

       if (!preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['email'])) {
            $this->error['email'] = $this->language->get('error_email');
       }

      //start contact mod by UKSB
       if ((strlen(utf8_decode($this->request->post['subject'])) < 6)) {
            $this->error['subject'] = $this->language->get('error_subject');
       }
      //end contact mod by UKSB

       if ((strlen(utf8_decode($this->request->post['enquiry'])) < 10) || (strlen(utf8_decode($this->request->post['enquiry'])) > 3000)) {
            $this->error['enquiry'] = $this->language->get('error_enquiry');
       }

       if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['captcha'])) {
            $this->error['captcha'] = $this->language->get('error_captcha');
       }
      
      if (!$this->error) {
           return true;
      } else {
           return false;
      }      
     }
}
?>
         ]]></add>
      </operation>
   </file>
</modification>
User avatar
uksitebuilder
 
Posts: 5602
Joined: Thu Jun 09, 2011 3:37 pm
Location: United Kindgom

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby Qphoria » Mon Jun 13, 2011 9:00 pm

uksitebuilder wrote:I'm having a problem in 1.5.0.4 using vQmod 1.10

I have a couple of xml files working fine.

But the following does not. it creates the cache files, but they exactly match the originals and I can't for the life of me understand why.


You need to redownload the latest version again and get the updated "vqmod_opencart.xml" file that fixes this issue
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18240
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: [MOD] - VirtualQMod "vQmod" Virtual File Modification Sy

Postby uksitebuilder » Mon Jun 13, 2011 9:02 pm

I only downloaded it liek 5 hours ago - has it been updated since then ?
User avatar
uksitebuilder
 
Posts: 5602
Joined: Thu Jun 09, 2011 3:37 pm
Location: United Kindgom

PreviousNext

Return to Free Contributions

Who is online

Users browsing this forum: adamngai and 10 guests

Hosted by Arvixe Web Hosting