News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Help with template

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

Previous topic - Next topic

Ninjab

hi there again.

I copied the template default.php that was in my Gavick template template overide folder and put it in the same folder making it default-Copy.php and I then went to both product details page to change the template for that product and also in the catrgory product listing as well, however it is not working. Does anyone have any idea why it might not be overiding and using the template I chose?

I deleted all data in that templete so that the data was not the same obviously :0

K&K media production

try to name it defaultCopy.php without hyphen or underscore

Ninjab

Thanks, I will try that.

My last question is: when calling the field on the template by php in custom fields on the product page, is it possible to call each field in a specific part of the page individually? Because I dont want all my custom fields grouped together and I need to put paragraphs of text above them and other fields inbetween them.

Thanks a lot for your help.


Ninjab

I read through those but I do not understand it.

I have specific custom fields that I want to display at different parts of the product page. They are not all in the same place. Those links speak of ontop and normal but I have no idea what they do or mean, and the template I have just outputs all the custom fields together. I want to do them one by one or as groups.

K&K media production

QuoteOR, you can do your own location

<?php if (!empty($this->product->customfieldsSorted['my-position'])) {
       $this->position='my-position';
       echo $this->loadTemplate('customfields');
    }
    ?>

and in custom field configuration add the name of the position

Ninjab

Thanks mate, I got it now. So anything that is set to that location will display from that location. Sorry I only had 3 hours sleep and travelled 5 hours so my brain not working as well ;)

Ninjab

Quote from: kkmediaproduction on May 01, 2013, 12:23:55 PM
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




Hi KK, I did follow your steps but I am having some problem or error. I created one main product and 3 child products under it. When I choose the generic child variant I created in creating a new custom field in the main product, the 3 child products are not in the dropdown list in the parent product. I followed these steps:

1. Create parent product.

2. Create 2-3 child variant products under the parent product.

3. Goto custom fields menu (from the main menu, not the parent product submenu) and create a new custom field. I select generic child variant, give it a title and then click save.

4. Go to the parent product again and then to custom fields. I select the generic cart variant I just made and add it, click on the drop down but there is no child products in the list. Why is it not bringing up the child products in that dropdown list?

Thanks.

K&K media production

the child products are in FE dropdown on product details page

Ninjab

Quote from: kkmediaproduction on May 04, 2013, 14:38:45 PM
the child products are in FE dropdown on product details page

Thanks. The video I saw actually had the products displayed in the dropdown list in the backend but mine doesnt, so I had not tried the actual site to see if functional.