Post by PupStar » Sat Feb 09, 2019 6:00 am

Good Evening,

I am trying to create a new module position called content_top which will allow me to show different banners, html etc in the header below the breadcrumb trail.

I have followed the instructions here but can not get it to show the content
https://stackoverflow.com/questions/481 ... pencart-3#

The only thing I have changed throughout the code is content_new to content_header

Any experts willing to have a stab at what the problem might be?

Thanks

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by OSWorX » Sun Feb 10, 2019 4:58 am

Because this 'tutorial' is written in a good quality, what happens if you do not change content_new to content_header?
And do exactly what is written?
Or maybe you have an error on your own code?

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PupStar » Sun Feb 10, 2019 5:39 pm

Hi, thank you for your reply.
I have reverted the code back to the original but it still does not work. The admin side works where I can select what I want to display but nothing displays on the shop side.
OSWorX wrote:
Sun Feb 10, 2019 4:58 am
Because this 'tutorial' is written in a good quality, what happens if you do not change content_new to content_header?
And do exactly what is written?
Or maybe you have an error on your own code?

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Sun Feb 10, 2019 9:09 pm

Where are you trying to add the new position ??
That tutorial you followed is just for the home page position

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Mon Feb 11, 2019 12:36 am

I have managed to get it working now on the home page position (although not sure what I did)

Ideally I would like to be able to use it on any/all pages, any ideas?

Thanks
cyclops12 wrote:
Sun Feb 10, 2019 9:09 pm
Where are you trying to add the new position ??
That tutorial you followed is just for the home page position

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Mon Feb 11, 2019 12:54 am

EDIT: add the module position to all pages via design/layout page

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Mon Feb 11, 2019 1:18 am

I have but it does not show on the either the category or the product pages.

I have added {{ content_new }} to category.twig and product.twig but no joy.
cyclops12 wrote:
Mon Feb 11, 2019 12:54 am
EDIT: add the module position to all pages via design/layout page

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Mon Feb 11, 2019 3:35 am

You would also need to add the relevant code to the relevant controller fields

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Mon Feb 11, 2019 4:01 am

ok so I added

$data['content_new'] = $this->load->controller('common/content_new');

to both category.php and product.php in catalog/controller/product/

I am learning slowly but what else am I missing???

Thanks
cyclops12 wrote:
Mon Feb 11, 2019 3:35 am
You would also need to add the relevant code to the relevant controller fields

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Tue Feb 12, 2019 1:39 am

How many different pages do you want this extra module position on ??
If it is multiple pages then you may be better putting the codes in header.php and header.twig instead of home.php and home.twig, then you just need to add a module to the new position on whatever page you want via design/layout.
If this is what you want then i can make up a quick zip file for you, if you cant manage it yourself.

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Tue Feb 12, 2019 3:23 am

Ideally I would like to have the choice of which pages to add it to but if its easier just to add it to the header then I am ok with that.
If you could put a zip together for me that would be great as I have looked at this code forever and still not sure what I am not doing correctly.
Thanks for your help :)
cyclops12 wrote:
Tue Feb 12, 2019 1:39 am
How many different pages do you want this extra module position on ??
If it is multiple pages then you may be better putting the codes in header.php and header.twig instead of home.php and home.twig, then you just need to add a module to the new position on whatever page you want via design/layout.
If this is what you want then i can make up a quick zip file for you, if you cant manage it yourself.

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Wed Feb 13, 2019 3:47 am

Have you got vqmod installed ?
Do you want it on just the product pages I.e category/product/manufacturer etc and home page?

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Wed Feb 13, 2019 4:01 am

cyclops12 wrote:
Wed Feb 13, 2019 3:47 am
Have you got vqmod installed ?
Do you want it on just the product pages I.e category/product/manufacturer etc and home page?
No I do not have vqmod and yes thoses pages.

Thanks

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Wed Feb 13, 2019 4:22 am

If you download the latest version of vqmod
Here is a link for vqmod

Attached is a zip which contains the 2 new files needed (content_header php which you need to put in catalog/controller/common+ twig file which goes in catalog/view/theme/default/template/common)and the vqmod file
Let me know how you get on with it

Attachments


Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by cyclops12 » Wed Feb 13, 2019 4:25 am

Along with vqmod i also use the vqmod manager to help keep things easy to manage.
I have attached it but up to you if you want to use it or not

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by PupStar » Wed Feb 13, 2019 4:37 am

Thank you so much I am very grateful.

I have downloaded them and have a go as soon as I get home and let you know

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by PupStar » Tue Feb 19, 2019 2:43 am

cyclops12 wrote:
Wed Feb 13, 2019 4:25 am
Along with vqmod i also use the vqmod manager to help keep things easy to manage.
I have attached it but up to you if you want to use it or not
Hi,
Sorry for not responding sooner, I have been down with man flu. The new module positions work great just how I wanted it ;D

I have tried to use the vqmod manager but I get an error
Required file "vqmod.php" is missing! Please install the latest OpenCart-compatible version of VQMod from https://github.com/vqmod/vqmod/releases ... 1-opencart and try again.
I downloaded from github and uploaded the file and reinstalled but the error still occurs.

Newbie

Posts

Joined
Fri Dec 28, 2018 10:30 pm

Post by cyclops12 » Wed Feb 20, 2019 12:50 am

Try this later version of vqmod manager

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 24 guests