Post by OCer » Sat Dec 31, 2016 4:38 pm

Can I get a more detailed log output when ocmod are applied, as the below I'm having trouble to get working.

I've ensured that the file exists, and the search phase exists in the file, but it just dosn't seem to create a file in the system/storage/modification directory. I thought a directory catalog would be create under the modification dir which would have the dir's and file I've modded.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <code>Journal2_blog_update</code>
    <name>Journal2 blog update</name>
    <version>1.0</version>
    <author>Neil Dudman</author>
    <link>http://www.opencart.com</link>
    <file path="catalog/view/theme/journal2/template/journal2/blog/posts.tpl">
        <operation>
            <search>
            <![CDATA[
               <?php foreach ($posts as $post): ?>
            ]]>
            </search>
            <add position="after" offset="1">
              <![CDATA[
                <?php if (strlen($post['name']) == 0) continue; ?>
              ]]>
            </add>
        </operation>
    </file>  
</modification>
in the log I only get, dosn't seem to have been applied
----------------------------------------------------------------
MOD: Journal2 blog update
----------------------------------------------------------------


Any help, or points what I'm doing wrong.

Thanks
Last edited by Johnathan on Sat Dec 31, 2016 11:48 pm, edited 1 time in total.
Reason: Added [code] tags for readability

Newbie

Posts

Joined
Mon Dec 19, 2016 9:28 pm

Post by cyclops12 » Sat Dec 31, 2016 7:09 pm

Code: Select all

<file path="catalog/view/theme/journal2/template/journal2/blog/posts.tpl">
Is this the correct path to the file ??

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by IP_CAM » Sun Jan 01, 2017 9:10 am

cyclops12 wrote:<file path="catalog/view/theme/journal2/template/journal2/blog/posts.tpl">
Is this the correct path to the file ??
Yes,it is.
catalog/view/theme/journal2/template/journal2/blog/posts.tpl
... without being aware of, what you're trying to achieve in detail, it's only one small line
of Code you want to add, and it could hardly 'influence' any other Extension routine negative
in reality, so, I would implement the Line directly into the
posts.tpl file, to make it look like this:

Code: Select all

<?php foreach ($posts as $post): ?>
<div class="<?php echo $grid_classes; ?>">
<?php if (strlen($post['name']) == 0) continue; ?>
<div class="post-wrapper">
or then like this:

Code: Select all

<?php foreach ($posts as $post): ?>
<div class="<?php echo $grid_classes; ?>">
<div class="post-wrapper">
<?php if (strlen($post['name']) == 0) continue; ?>
or even like this:

Code: Select all

<?php foreach ($posts as $post): ?>
<?php if (strlen($post['name']) == 0) continue; ?>
<div class="<?php echo $grid_classes; ?>">
<div class="post-wrapper">
by plain trail and error attempt, then, you should be able to at least reproduce some
kind of visible or error-logged 'result' (whenever a post name Value '0', meaning 'none', is found, I guess ?!)
Good Luck ! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by JNeuhoff » Sun Jan 01, 2017 7:55 pm

You are not giving many details here. However, in general it is possible that another 3rd party ocmod.xml or vqmod.xml may have done changes to the same template file, and when your ocmod.xml was processed the search target line didn't exist anymore.

Also, please be aware that the Journal themes are one of the worst Opencart theme as it hardly abides by the OpenCart standards for web themes. The Journal web theme will clash with many other 3rd party extensions. If the only reason for using the Journal theme is the built-in blog feature then you might be better off with using another dedicated blog extension which doesn't rely on or come with such a bloated web theme.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 2 guests