VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: hababa on August 17, 2013, 00:56:59 AM

Title: Categories and product listing strange design
Post by: hababa on August 17, 2013, 00:56:59 AM
Hy!

I wanted to do to show the custom fields at product listing. I tried to modify the \virtuemart\vm\components\com_virtuemart\views\category\tmpl\default.php file, but it won't work. I copied the original file to a safe place before I started to modify the php file. So after my code didn't work, I replaced that with the original php and I'm surprised, becouse it still not work properly.  :(

It looks like some kind of a missing css or something, but no, I didn't modify any css at the moment.

The categories and the product listing page looks like at the attached files.  I use the 2.0.22b version of VirtueMart.

I will be very happy if you can help me.  :)

[attachment cleanup by admin]
Title: Re: Categories and product listing strange design
Post by: liquid.ideas on August 17, 2013, 19:04:18 PM
Is this your own template or one you downloaded or purchased? If it is not your own it is possible there is an override in the template.
Title: Re: Categories and product listing strange design
Post by: hababa on August 17, 2013, 20:46:05 PM
I downloaded this template. It works fine, it doesn't override the product lists.

I modified the virtuemart\vm\components\com_virtuemart\views\category\tmpl\default.php file, but I can't do what I want, so I replaced that file with the original one. And after overriding the file with the original one, the site looks like in the picture I attached. But why? :(
Title: Re: Categories and product listing strange design
Post by: liquid.ideas on August 17, 2013, 22:27:58 PM
just wanna make sure before we go any further :) in yoursite/templates/yourtemplatename/ - there isnt a file called htm with VM content in it?

And if you go to the component virtuemart, configuration, templates what is selected next to the Category Template?
Title: Re: Categories and product listing strange design
Post by: hababa on August 17, 2013, 22:35:10 PM
There is just only an index.html with a default <html><body></body></html> content. Other html files are in the templatename/html folder.

The most interesting thing is that if I change the Category Template to any other template, it will not take effect, always with this template shows the listing. (Maybe becouse the other templates not for Virtuemart). But yes, this template is selected for Category Template.
Title: Re: Categories and product listing strange design
Post by: liquid.ideas on August 17, 2013, 23:00:57 PM
ok cool, only html files in templatename/html no VM files. So what I suggest you do is copy default.php from

yoursite\components\com_virtuemart\views\category\tmpl

to:

yoursite\templates\yourtemplate\html\com_virtuemart\category

And work on it from there, should override virtuemart
Title: Re: Categories and product listing strange design
Post by: hababa on August 17, 2013, 23:24:37 PM
yoursite\templates\yourtemplate\html\com_virtuemart\category doesn't exists, the html folder doesn't contain com_virtuemart folder, so I created this structure, copy the file there, but the problem is still the same. :(
Title: Re: Categories and product listing strange design
Post by: liquid.ideas on August 17, 2013, 23:40:04 PM
copy the file there and then do something to work on it or try break the php and tell me what happens?
Title: Re: Categories and product listing strange design
Post by: liquid.ideas on August 17, 2013, 23:41:40 PM
Ok hang on I am going the wrong way about this, just realised. what code did you have before modification and what code are you putting in?
Title: Re: Categories and product listing strange design
Post by: hababa on August 17, 2013, 23:52:09 PM
I copied the code from this post: http://forum.virtuemart.net/index.php?topic=99225.msg344230#msg344230

It didn't worked, so I delete theese lines and save default.php, but something went wrong. :(

I send you a PM.