Page 1 of 1

[SOLVED] Template Support

Posted: Sat Feb 27, 2016 7:53 am
by WayneOB
Hi,

I installed a Template Monster Theme 'Free OpenCart Theme for Mobile Shop' on my OC 2.0.0.0. There were a few bugs with the HTML editor so I searched forums for how to fixes. Results suggested that OC needed to be updated. Therefore, I updated OC to 2.0.2.0. Everything worked fine with the HTML editor after, however I noticed the following error with the captcha on the following pages, contact, returns and reviews;
Image

Line 154 of RETURN_FORM.TPL is;

Code: Select all

<label class="col-sm-2 control-label" for="input-captcha"><?php echo $entry_captcha; ?></label>
If I switch to default theme the error does not show, therefore clearly a bug with the theme. I checked theme details and it says compatible with 2.0.0.0, 2.0.1.0. So obviously I made a big mistake jumping to 2.0.2.0 update.

I tried to contact Template Monster about this but they said that no support is available on free themes. Fair enough.

My question is, can this error be easily fixed by modifying some code?
Can anyone here advise on what code needs to be modified?

I did try replacing the code in /view/theme/mytheme/template/information/contact.tpl;

Code: Select all

<div class="form-group required">
            <label class="col-sm-2 control-label" for="input-captcha"><?php echo $entry_captcha; ?></label>
            <div class="col-sm-10">
              <input type="text" name="captcha" id="input-captcha" class="form-control" />
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-10 pull-right">
              <img src="index.php?route=tool/captcha" alt="" />
              <?php if ($error_captcha) { ?>
                <div class="text-danger"><?php echo $error_captcha; ?></div>
              <?php } ?>
            </div>
          </div>
with code from /view/theme/default/template/information/contact.tpl;

Code: Select all

<?php if ($site_key) { ?>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div>
                <?php if ($error_captcha) { ?>
                  <div class="text-danger"><?php echo $error_captcha; ?></div>
                <?php } ?>
              </div>
            </div>
          <?php } ?>
Although this seemed to work and showed the Google Captch, when I submitted the form it gave other issues;

Code: Select all

PHP Warning:  file_get_contents() .............
If no-one can help with a fix, then my second question would be is it possible to roll-back, install version 2.0.1.0 over 2.0.2.0? If so how do I go about doing this?

Re: Template Support

Posted: Sat Feb 27, 2016 4:12 pm
by artcore
When you inspect the theme zip package, do you see any folders named 'controller'?
Specifically controller/account/returns.php and /information/contact and the other one.
If not, is there an vqmod or ocmod xml? Inspect these for changes to controllers.

I guess there's no support for a free theme from Monster Template?

Re: Template Support

Posted: Sat Feb 27, 2016 9:02 pm
by WayneOB
Hi artcore,

I don't see any of those folders/files in the installation package.

Yes, TM said no support for FREE themes.... ::)

I did notice someone else here have the same problem with another theme and he said that he fixed issue. I Pm'd him and replied to his thread; viewtopic.php?f=182&t=149638 ...but to no avail :(

Any help here would be greatly appreciated.

Re: Template Support

Posted: Sat Feb 27, 2016 9:07 pm
by artcore
Sure I'll take a look. You can pm me the details

Re: [SOLVED] Template Support

Posted: Mon Feb 29, 2016 5:42 pm
by WayneOB
I would like to thank artcore for his support with this issue. The problem is now solved.

The theme that I have has hardcoded customized core, which of course causes problem when trying to update core files. This strengthens the fact that OC templates should only address design and nothing else.

Thank you artcore

Re: [SOLVED] Template Support

Posted: Mon Feb 29, 2016 5:55 pm
by artcore
My pleasure Wayne!
For the record, I don't know if the theme has hardcoded core changes. I just added the missing parts to the core myself without using ocmod or similar :) But you have the changes documented just in case ;)

Cheers

Re: [SOLVED] Template Support

Posted: Mon Apr 04, 2016 1:32 am
by Zvezdo
Can you please share solution as I have same problem?