News:

Support the VirtueMart project and become a member

Main Menu

Help with template

Started by Ninjab, April 27, 2013, 11:37:53 AM

Previous topic - Next topic

Ninjab

Hi there, I am trying to modify a Joomla template with virtuemart and I have not really used the new VM before. What I am trying to do is replicate the attached layouts. The first file is how I want to replicate the category listing, and the 2nd is the product layout.

I think I would be able to achieve this in K2 as I am more familiar with it since you can choose not to display certain fields,but the template I bought it setup with VM and I'd prefer to learn VM.

The category feed listing would need to have only a feature list and these headers and with no image (so I'd also need to be able to allow the user to click a link to go to a product) but I do not know how to give/put this info only in the category feed and not in the product listing as the informations are somewhat different.

Can someone please help me with what I would need to do to make my category listing feed replicate my attached image?

Thanks.

[attachment cleanup by admin]

K&K media production


Ninjab

Thanks I read that already but do not understand.

However I think I can do it by editing the category template but I need it to display a a custom field 'edit form' in the category view. Can you please advise on what the field to call upon is for displaying product custom fields in category view? My extra custom field would be called 'backup;.

Thanks.

K&K media production

You can use the "sign up" button as "product details" button. The second image is your product details page where you can order the product. You can work with one main product and 3 child products. With this workflow, custom fields and template overrides you can realize it.

Ninjab

Can I use a customfield in category view though? If so what is the syntax for the array to do this? I find this way easier for me.

K&K media production

your "edit form" from the images is a new site

how would you add the data from your own form to the cart?

Use my way. Is easy. Only set up one product with the custom fields and the other 3 as childs. On the childs the only thing you must change is the product description and the price.


Ninjab

Hi again...I understand what you mean by the children I think. I I know how to do the product page,  but it is the category page I was referring to.

I want to make it look like the 1st picture on this forum topic. .. However these types of text I don't want displayed in my product page, only in the category view.

So in order to do this I wanted to use a custom field html to be displayed from the product data.
This is why I'm asking what array or php code I need to use to be able to do it in category view.

Do you know what I mean?

Thanks again.

Ninjab

It is possible to do it with using short description but I'd prefer to use a html field as I can see what I am editing.

K&K media production

with your own template override you can display the product detail description on category view and hide it on detail page

believe me, you can realize it so that the look is like your pictures

study the usage of template overrides...it is the same like joomla overrides

Ninjab

#9
Hi kkmedia

Can you please be more specific? It is too vague for me to know what you are talking about. I had tried but I got too confused to what you mean specifically. Sorry. I was thinking you meant create a menu link to one product and this product would display all children products product_descriptions (and other relevant fields) in its view using one template for this product. And the children products will have a different template to display the product description and other fields. However I do not know how to achieve this as I do not know what fields to use for children in a product page?

My alternative way:
The only way I thought I could do it is the product description is only displayed in the category view in my first image in this thread.

To display the other information and in the product detail view page, hide the product description and other information that is being displayed in the category view.

K&K media production

Quote
you can realize this with template overrides, it is the same like Joomla Overrides

http://docs.virtuemart.net/tutorials/33-templating-layouts/78-introduction-template-system.html

Have you read this?

you need it for the layout of your category page and product details page


1. create a category (set 4 products per row)
2. create a product (your first product as parent)
3. set up custom fields (generic child variant, cart variant)
4. add the custom fields to the product
5. create 3 child products
6. adapt the layout from your images with template overrides



Ninjab

Hi again, I did briefly read that and had viewed some videos on template overrides.

The gavick template I had already has their gk_yourshop/html/com_virtuemart template overide in it. How do I create another trmplate overide one in there? Or do I need to copy the template again and use it only for those pages? When I goto VM config it says I have 'No override', 'Default', 'pdf' and 'notify'.

However I am trying to see what you mean by getting me to create 3 child products? Is it just because the 4 products are very similar you are telling me to do this? Or is it for another reason?

So my dilemna is I want to be able to use different data for my product_description....one for category view and one for product view...however the information/data/text will be different. I can understand I can use customfields to do different in product view but I would prefer not to. However that would not need to use template overrides then if I did it like that since a product description in category view would be different content than the product view (which would make layout and CSS irellevant).

I could be still misunderstanding you though :(

K&K media production

#12
you can make different overrides in the directories and choose it in category settings.

child products:
http://docs.virtuemart.net/manual/17-products-menu/33-product.html

the custom fields are to swich between your parent and child products or add some features to your product

read the documentation, manuals, faq's and use the forum search ... there you will find all these things

Ninjab

hi again, do you mean if I have the directory /template/html/com_virtuemart/category............in there there is default. IN order to create another override template or file I can create another file named for example 'product_variation.php' and I will be able to choose it under the category template choice dropdown option?

I have read those documents on template override and it is not very detailed in this regard. It only tells you how to do it for one instance per mnodule or component etc, but not for multiple. There is no docuementation for VM on this, only reference to Joomla.

Thanks.

Ninjab

I duplicated my default.php file in the cateogry directory and it is an available option to choose, so I guess just creating a new one and changing the name was sufficient.