Post by qahar » Tue Nov 24, 2015 11:05 pm

maccadon wrote:I noticed some errors when browsing the theme in Safari 9 on mac.

Checkout steps
The backgrounds folds up and down twice

Product-grid (categories)
The price goes through the productname (sometimes)

productpage-featured products
Star rating goes beneath the product box
But in all other browsers i don't have these problems.
I'm not using mac, so reproduce and fix this issue is hard for me. But I will try to help.

Checkout steps
default2 not come with the checkout-step template, so possibly you will get same result on default theme.

Product-grid (categories)
Based on the screenshoot I can tell that somehow the equal-height script is not triggered.
When you get the issue, what happen if you click the List-Grid button ? When the height is fixed after you click List-Grid then it's certain that the issue with equal-height script initial load is not triggered.

productpage-featured products
I'm not remember OpenCart have feeatured products page, does this custom page? Then check the template to at least match special.tpl that come with default2 theme.
Related to star rating possibly related to template or the equal-height like issue above.

I hope it's can help you

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by barrypty » Tue Dec 22, 2015 1:02 am

Good theme default2

There is a white space in the title of the category page. I was looking in many places and was not able to find the solution. I even installed the white space remove module. I anyone can help me I will appreciate it.

Page is: hobbiespanama.com

Image

http://hobbiespanama.com/index.php?rout ... ry&path=33

Newbie

Posts

Joined
Sun Dec 20, 2015 2:13 am

Post by qahar » Tue Dec 22, 2015 1:44 am

You mean the double line? it's intended to be like that.

If you want to change it to single line, open default2 header.tpl and remove "navbar-double" class.

Or customize it to your like by creating default2_custom.css which is automaticly loaded if exist (ref here)

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by barrypty » Tue Dec 22, 2015 2:13 am

No, but thanks for that tip. I want to remove the white space on top and bottom of the title.

Newbie

Posts

Joined
Sun Dec 20, 2015 2:13 am

Post by barrypty » Tue Dec 22, 2015 9:37 am

I was looking for the .css and .tpl files with no results. I even deleted many lines in those files and nothing happened to the template.

Newbie

Posts

Joined
Sun Dec 20, 2015 2:13 am

Post by qahar » Wed Dec 23, 2015 3:19 pm

I missundestand your first question.

The heading title top white space come from breadcrumbs block.
The bottom space of it come from "category-panel" class under "category-product" div wrapper.

You see height white space gap because you put the module on left sidebar.
Consider the other way around from this demo page

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by barrypty » Thu Dec 24, 2015 5:14 am

Can that be changed in the css?

Newbie

Posts

Joined
Sun Dec 20, 2015 2:13 am

Post by qahar » Fri Dec 25, 2015 2:02 pm

Yes you can. If you know how to use Firebug on firefox or the Inspect at chrome, you will know which part need to change and this is simple matter.
But if you doesn't grab the basic of html/ css development, fix the specific page by reducing the margin is also affecting the rest of all pages. That will make you get another issue.

I simply use the browser to move the banner module under category module where I'm not change any existing margin:
hobbiespanama-product-category-path-33.png

hobbiespanama-product-category-path-33.png (86.24 KiB) Viewed 6618 times


User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by maccadon » Thu Jan 14, 2016 9:09 pm

I finally have time to try your suggestions. But i would like to have custom modules in the information pages. Is it possible to have this work in those pages? If possible i would like to add the positions information_a and information_b.
I tried adding those to the code you supplied but i couldn't select them in Design -> Layout.
qahar wrote:It's possible, by modificating default2_theme.xml and related product template.
Backup related file before modificate incase something goes wrong.

1. Unreg content_btm_a from product page content_bottom
Find <file path="catalog/controller/common/content_bottom.php">

Code: Select all

// Replace:
$blockToLoad = array('content_btm_a', 'content_btm_b');

// With:
if (isset($this->request->get['product_id'])) {
    $data['position_content_btm_a'] = '';
    $blockToLoad = array('content_btm_b');
} else {
    $blockToLoad = array('content_btm_a', 'content_btm_b');
}
2. Reg content_btm_a directly to product page
Find <file path="catalog/controller/product/product.php">

Code: Select all

// Replace:
$blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c');

// With:
$blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c', 'content_btm_a');
3. Load content_btm_a at product template
Open the product template (product.tpl or product_d2_2.tpl) based on your default2 product template setting.
And add code below before the tab

Code: Select all

<?php echo $position_content_btm_a; ?>

<ul class="nav nav-tabs product-tab">
    ...
</ul>
Block position doesn't have styling (margin, padding, etc), you can wrap it with custome wrapper style.

Code: Select all

<div style="margin: -40px 0 30px;">
    <?php echo $position_content_btm_a; ?>
</div>
The end result:
default2_move_content_btm_a.png

Active Member

Posts

Joined
Thu Aug 05, 2010 9:57 pm

Post by qahar » Sat Jan 16, 2016 12:56 am

To register new module position, open default2_theme.xml and find

Code: Select all

<file path="admin/controller/design/layout.php">
then register your new Block Position inside code

Code: Select all

$data['positions'] = array(
   ...
);

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by asperon » Sun Jan 17, 2016 6:24 pm

Hi, great job there :) i have a question how to make navbar full width? Regards: Nick

Newbie

Posts

Joined
Sun Jan 17, 2016 6:21 pm

Post by maccadon » Mon Jan 18, 2016 4:28 am

I changed the files but it won't load the module. It gives the error
Notice: Undefined variable: position_informatie_1 in /catalog/view/theme/default2/template/information/information.tpl on line 31

Code: Select all

<file path="catalog/controller/" name="common/home.php,product/manufacturer.php,product/compare.php,product/search.php,information/information.php,checkout/cart.php">
        <operation info="default2 features">
            <search position="before"><![CDATA[$this->load->controller('common/footer')]]></search>
            <add><![CDATA[
                if ($this->config->get('config_template') == 'default2') {
                    $data['default2']   = $this->config->get('default2');

                    $this->load->model('extension/default2');

                   $blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c', 'content_btm_a','informatie_1,'informatie_2'');

                    $data += $this->model_extension_default2->getAllPosition($blockToLoad);
                }
            ]]></add>
        </operation>
    </file>
    <file path="catalog/controller/product/product.php">
        <operation info="default2 features">
            <search position="before"><![CDATA[$this->load->controller('common/footer')]]></search>
            <add><![CDATA[
                if ($this->config->get('config_template') == 'default2') {
                    $data['default2']   = $this->config->get('default2');

                    $this->load->model('extension/default2');

                    $blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c', 'content_btm_a','informatie_1','informatie_2');

                    $data += $this->model_extension_default2->getAllPosition($blockToLoad);
                    $data['footer'] = $this->load->controller('common/footer');
                    $data['header'] = $this->load->controller('common/header');

                    $templates          = array();
                    $template_product   = $data['default2']['template_product'];
                    $template_options   = array_diff(array(1, 2), array($template_product));

                    foreach ($template_options as $opt) {
                        if (isset($data['default2']['template_product_specific_' . $opt])) {
                            $templates = array_map('trim', explode(',', $data['default2']['template_product_specific_' . $opt]));
                            if (in_array($product_id, $templates)) {
                                $template_product = $opt;
                                break;
                            }
                        }
                    }

                    $default2_template  = 'product_d2_' . $template_product;
                    if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/product/' . $default2_template . '.tpl')) {
                        return $this->response->setOutput($this->load->view($this->config->get('config_template') . '/template/product/' . $default2_template . '.tpl', $data));
                    }
                }
            ]]></add>
        </operation>
    </file>

Code: Select all

<file path="admin/controller/design/layout.php">
        <operation info="Listing default2 extra layout">
            <search position="before"><![CDATA[design/layout_form.tpl]]></search>
            <add><![CDATA[
                $data['positions'] = array(
                    'tlb_top_left'      => 'Toolbar Top Left',
                    'tlb_top_right'     => 'Toolbar Top Right',
                    'main_menu'         => 'Main Menu',
                    'top_a'             => 'Top A',
                    'top_b'             => 'Top B',
                    'top_c'             => 'Top C',
                    'content_top_a'     => 'Content Top A',
                    'content_top_b'     => 'Content Top B',
                    'sidebar_left'      => 'Sidebar Left',
                    'sidebar_right'     => 'Sidebar Right',
                    'content_btm_a'     => 'Content Bottom A',
                    'content_btm_b'     => 'Content Bottom B',
                    'bottom_a'          => 'Bottom A',
                    'bottom_b'          => 'Bottom B',
                    'bottom_c'          => 'Bottom C',
                    'footer_ribbon'     => 'Footer Ribbon',
                    'footer_a'          => 'Footer A',
                    'footer_b'          => 'Footer B',
                    'footer_c'          => 'Footer C',
                    'tlb_btm_left'      => 'Toolbar Bottom Left',
                    'tlb_btm_right'     => 'Toolbar Bottom Right',
                    'hide_blk_top'      => 'Hidden Block Top',
                    'hide_blk_btm'      => 'Hidden Block Bottom',
'informatie_1'      => 'informatie los',

Code: Select all

    <file path="catalog/controller/common/content_bottom.php">
        <operation info="default2 features">
            <search position="before"><![CDATA[DIR_TEMPLATE . $this->config->get('config_template')]]></search>
            <add><![CDATA[
                if ($this->config->get('config_template') == 'default2') {
                    $this->load->model('extension/default2');

                    if (isset($this->request->get['product_id'])) {
    $data['position_content_btm_a'] = '';
    $blockToLoad = array('content_btm_b');
} else {
    $blockToLoad = array('content_btm_a', 'content_btm_b');
}
                    $data += $this->model_extension_default2->getAllPosition($blockToLoad);
                }
            ]]></add>
        </operation>
    </file>

Active Member

Posts

Joined
Thu Aug 05, 2010 9:57 pm

Post by qahar » Mon Jan 18, 2016 1:01 pm

asperon wrote:Hi, great job there :) i have a question how to make navbar full width? Regards: Nick
Thanks

You can remove the "container" class from navbar wrapper at header.tpl

Code: Select all

<div class="container">
  <div id="nav-main">
    ...
  </div>
</div>

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by qahar » Mon Jan 18, 2016 1:04 pm

@maccadon

Issue with quote in your code

Code: Select all

$blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c', 'content_btm_a','informatie_1,'informatie_2'');
Should be

Code: Select all

$blockToLoad = array('top_a', 'top_b', 'top_c', 'bottom_a', 'bottom_b', 'bottom_c', 'content_btm_a','informatie_1','informatie_2');

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by maccadon » Mon Jan 18, 2016 4:25 pm

Thanks for the tip, i changed those settings but it still doesn't work.

I placed this code in information.tpl

Code: Select all

<?php echo $position_informatie_1; ?>


You can see my xml on my test site

http://www.djuricek.nl/default2_theme.xml

I really need extra module positions so i hope you can help me. If it's a custom job then let me know.

Active Member

Posts

Joined
Thu Aug 05, 2010 9:57 pm

Post by qahar » Mon Jan 18, 2016 9:10 pm

Your code is correct, it's odd why not working.

If you already assign module to that position and put the $position_informatie_1 to default2 information.tpl template; the module should be show.

Send me private message with your site access, let me take quick look.

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by nurselotsaluv » Wed Jan 27, 2016 12:27 pm

I have installed Default2 in my Opencart (version 2.1.0.2) using the Extension Installer. I set the permissions in User Groups -> Admin and have selected it to be my Theme. However, it is not showing up in my Design tab.

I am having to start my Opencart from scratch because I inadvertently gorched the last one, and I had Default2 installed and working wonderfully before....

I went through the Install doc a few times but maybe I have missed something crucial to "activate" the extension?

New member

Posts

Joined
Tue Jan 12, 2016 6:16 am
Location - United States

Post by qahar » Thu Jan 28, 2016 3:24 pm

may be Extension Installer not upload the theme files properly, try to upload manually with FTP

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by qahar » Sun Jan 31, 2016 10:34 pm

default2 v1.3.0 released!

Updates:

Fix not found page on Product and Category
Fix coupon, voucher and shipping template
Improve Navbar top link clickable
Improve sidebar left and right position
Refactor block position
Add site layout: box, frame, full, wide
Add site width option per viewport
Add custom stylesheet editor
Add Gearbox module: navigation and product

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by nurselotsaluv » Mon Feb 01, 2016 12:57 pm

qahar wrote:may be Extension Installer not upload the theme files properly, try to upload manually with FTP
I tried to manually install all of the files via FTP - they were all there already so I just replaced them just in case. I have even updated to your newest version and made sure all of the permissions were checked in the User Group.

When I activate the Default2 theme (because it will show up in settings, I am just not getting the design module under Design) I get errors on my web page like:

Undefined variable: position_sidebar_left in /customers/2/d/c/theluvoffice.com/httpd.www/upload/catalog/view/theme/default2/template/common/column_right.tpl on line 14

and

Notice: Undefined variable: position_content_btm_a in /customers/2/d/c/theluvoffice.com/httpd.www/upload/catalog/view/theme/default2/template/common/content_bottom.tpl on line 10

All the way down and across the page.

I know there has to be something I am missing, I had it working before...

New member

Posts

Joined
Tue Jan 12, 2016 6:16 am
Location - United States
Who is online

Users browsing this forum: No registered users and 3 guests