Author Topic: Custom field layout position VM 2.0.1  (Read 70014 times)

neutrino86

  • Beginner
  • *
  • Posts: 11
Custom field layout position VM 2.0.1
« on: February 02, 2012, 21:18:43 pm »
I a French user of Virtuemart and i try to make a new website with VM2 so, i have i little problem with custom fileds.
Sorry for my approximate english.

I use VM2.0.1b and i would like to add custom fields in product page.
When i attach a filed with a product i don't see it in product page, i think i need to precise a position in "layout position" field but I don't know what i can take in this field.


Thanks in advance for your help

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9667
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Custom field layout position VM 2.0.1
« Reply #1 on: February 02, 2012, 21:24:47 pm »
You can even define different position and set where they should be.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #2 on: February 03, 2012, 03:22:38 am »
neutrino86, when you choose "cart variant" the default position will be in the add to cart form.

THEN,
the ONLY other default positions in the product layout is

"ontop"
THIS CODE IS IN views/productdetails/tmpl/default.php

if (!empty($this->product->customfieldsSorted['ontop'])) { ?>
   <div class="product-fields">
   <?php
   $custom_title = null ;
   foreach ($this->product->customfieldsSorted['ontop'] as $field){
      if ($field->display) {
         ?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
         <?php if ($field->custom_title != $custom_title) { ?>
            <span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>
            <?php if ($field->custom_tip) echo JHTML::tooltip($field->custom_tip,  JText::_($field->custom_title), 'tooltip.png');
         } ?>
         <span class="product-field-display"><?php echo $field->display ?></span>
         <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
         </div>
         <?php
         $custom_title = $field->custom_title;
      }
   } ?>
   </div>
<?php } // Product Custom ontop end ?>


YOU can actually set your own positions anywhere. By copying this code, and renaming the "position"
YOU JUST change the 'ontop'


<?php if (!empty($this->product->customfieldsSorted['ontop'])) { ?>
   <div class="product-fields">
   <?php
   $custom_title = null ;
   foreach ($this->product->customfieldsSorted['ontop'] as $field){
      if ($field->display) {
         ?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
         <?php if ($field->custom_title != $custom_title) { ?>
            <span class="product-fields-title" ><?php echo JText::_($field->custom_title); ?></span>
            <?php if ($field->custom_tip) echo JHTML::tooltip($field->custom_tip,  JText::_($field->custom_title), 'tooltip.png');
         } ?>
         <span class="product-field-display"><?php echo $field->display ?></span>
         <span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
         </div>
         <?php
         $custom_title = $field->custom_title;
      }
   } ?>
   </div>
<?php } // Product Custom ontop end ?>
I do NOT do development work for hire.

neutrino86

  • Beginner
  • *
  • Posts: 11
Re: Custom field layout position VM 2.0.1
« Reply #3 on: February 04, 2012, 22:30:10 pm »
Thanks for your help, that will be very useful later to customise my product page.

The problem is that the the custom fields don't appear at all when i use "VM - Custom, customer text input" plugin.

With "VM - Custom, product specification" plugin the fields appear properly.

I will try with 2.0.1c version to see if this problem is fixed.

bluesheep

  • Beginner
  • *
  • Posts: 18
Re: Custom field layout position VM 2.0.1
« Reply #4 on: February 09, 2012, 10:36:13 am »
Hello Forum

I need to know how i can display the customfieldsCart as a <li> and not as a <option>.

I know, that this will break the function of the shop. But, we use the shop only as a catalog and want to show all variants.

I hope, someone can help me.

Beste Grüsse
bluesheep

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #5 on: February 09, 2012, 14:21:06 pm »
Hello Forum

I need to know how i can display the customfieldsCart as a <li> and not as a <option>.

I know, that this will break the function of the shop. But, we use the shop only as a catalog and want to show all variants.

I hope, someone can help me.

Beste Grüsse
bluesheep


You should use the "product specification" plugin.

Thats is for display

Hard Drive: LARGE
Color: Red


I do NOT do development work for hire.

Merry

  • Jr. Member
  • **
  • Posts: 83
  • When life hands you lemons, grab tequila and salt.
    • ShowMeGuides
Re: Custom field layout position VM 2.0.6
« Reply #6 on: April 24, 2012, 19:44:53 pm »
Custom Field New or Edit - Layout position text box choices - Stabbing around and a Google search is yielding no results.

What words can go into this box to affect the layout of the Custom Field? It seems a drop-down box with limited choices would help a ton, or a tooltip, but in lieu of that I'd love to add the list of choices to the VM2 documentation.

TIA,
Merry


Answer is probably from my VirtueMart 2 User Manual ebook, includes FREE updates. FREE Admin Menu Cheatsheet, Quick Install Guide & 30-Minute Quick Setup Guide http://showmeguides.com/

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #7 on: April 24, 2012, 21:19:02 pm »
Custom Field New or Edit - Layout position text box choices - Stabbing around and a Google search is yielding no results.

What words can go into this box to affect the layout of the Custom Field? It seems a drop-down box with limited choices would help a ton, or a tooltip, but in lieu of that I'd love to add the list of choices to the VM2 documentation.

TIA,
Merry




THIS NOT for cart attributes, ONLY other custom fields

Here are the ones in the current default template
ontop
normal
onbot


OR, you can do your own location

<?php if (!empty($this->product->customfieldsSorted['my-position'])) {
       $this->position='my-position';
       echo $this->loadTemplate('customfields');
    }
    ?>
I do NOT do development work for hire.

Merry

  • Jr. Member
  • **
  • Posts: 83
  • When life hands you lemons, grab tequila and salt.
    • ShowMeGuides
Re: Custom field layout position VM 2.0.1
« Reply #8 on: April 25, 2012, 00:00:15 am »
Thank you, thank you! Solved a great mystery - I had seen a lead about ontop but couldn't find anything else on it.

Merry
Answer is probably from my VirtueMart 2 User Manual ebook, includes FREE updates. FREE Admin Menu Cheatsheet, Quick Install Guide & 30-Minute Quick Setup Guide http://showmeguides.com/

devkbsc

  • Beginner
  • *
  • Posts: 9
Re: Custom field layout position VM 2.0.1
« Reply #9 on: July 10, 2012, 23:09:05 pm »
Hello Sir Madame,

Me too, I have the same problem, I am newbee to php. I don't know how to positioning the custom fields. Since one month i am trying to display differnet types of custom fields in the different position in the product page. if you have seen my post, please give a solution.

Description:

1)Some custom fields are already created : type(text editor)

those are displying in the default position.

2) I have created some more custom fields : type(image)

Now i would like to display the image custom fields on the top of the page. is it any possibilities to do that?

kyteasdale

  • Beginner
  • *
  • Posts: 16
Re: Custom field layout position VM 2.0.1
« Reply #10 on: July 24, 2012, 15:48:59 pm »
Hi all,

I'm using VM as a catalogue and not displaying prices, so "Cart Attributes" aren't displayed; yet I'd like the custom fields besides the "Ask a question about this product" button.

Is there a preset layout position for this?

Thanks

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #11 on: July 24, 2012, 17:20:46 pm »
Hi all,

I'm using VM as a catalogue and not displaying prices, so "Cart Attributes" aren't displayed; yet I'd like the custom fields besides the "Ask a question about this product" button.

Is there a preset layout position for this?

Thanks

what fields do you want to show?

I do NOT do development work for hire.

kyteasdale

  • Beginner
  • *
  • Posts: 16
Re: Custom field layout position VM 2.0.1
« Reply #12 on: August 06, 2012, 14:29:03 pm »
Pretty much just the Ask a question field.  Beneath that I'd like the series of custom fields - then the description.

Sorry if that wasn't what you were asking.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10282
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #13 on: August 06, 2012, 16:34:56 pm »
Pretty much just the Ask a question field.  Beneath that I'd like the series of custom fields - then the description.

Sorry if that wasn't what you were asking.

which fields? the atributes?
the only way to do this is to change it to NOT catalogue,

then remove the add to cart code & price code from the template
I do NOT do development work for hire.

jason45

  • Beginner
  • *
  • Posts: 5
Re: Custom field layout position VM 2.0.1
« Reply #14 on: September 07, 2012, 09:52:58 am »
While attaching the file along with the product it is not possible to view it on the product page. I believe there is some kind of positioning failure