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

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #15 on: September 07, 2012, 16:08:53 pm »
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


what?
I do NOT do development work for hire.

zorro lee

  • Beginner
  • *
  • Posts: 11
Re: Custom field layout position VM 2.0.1
« Reply #16 on: September 29, 2012, 22:54:46 pm »
How to add custom fields in category view?

1cube1wheel

  • Beginner
  • *
  • Posts: 2
Re: Custom field layout position VM 2.0.1
« Reply #17 on: October 10, 2012, 01:36:26 am »
@PRO,

Based on the code in /views/productdetails/tmpl/defualt, it seems like setting the layout position to 'ontop' places the custom fields under the 'Short Description' section, while setting the position to 'normal' places them under the 'Product Description' section.  I have adjusted the layout position using both 'ontop' and 'normal', but the position of my fields is not changing at all.  I also tried inserting the code you posted like this:

   <?php
   // Product Description
   if (!empty($this->product->product_desc)) {
       ?>
        <div class="product-description">
   <?php /** @todo Test if content plugins modify the product description */ ?>
       <span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE') ?></span>
   <?php echo $this->product->product_desc; ?>
        </div>
   <?php
    } // Product Description END

    if (!empty($this->product->customfieldsSorted['normal'])) {
   $this->position = 'normal';
   echo $this->loadTemplate('customfields');
    } // Product custom_fields END
    // Product Packaging
    $product_packaging = '';
    if ($this->product->product_box) {
   ?>
        <div class="product-box">
       <?php
           echo JText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
       ?>
        </div>
       <?php if (!empty($this->product->customfieldsSorted['my-position'])) {
       $this->position='my-position';
       echo $this->loadTemplate('customfields');
       }
       ?>
    <?php } // Product Packaging END
    ?>

However, I do not know if this is correct placement as I am unfamiliar with PHP.  Any assistance you can provide is appreciated.  I am running version 2.0.12.

Flasher

  • Beginner
  • *
  • Posts: 37
Re: Custom field layout position VM 2.0.1
« Reply #18 on: February 01, 2013, 02:30:24 am »
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');
    }
    ?>


Hi All. I try to use this code after the price is displayed but nothing happens... i don't get the custom fields displayed. :(

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9743
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Custom field layout position VM 2.0.1
« Reply #19 on: June 12, 2013, 13:06:33 pm »
The custom needs of course also your position.
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: 10293
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #20 on: June 12, 2013, 18:22:23 pm »


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


Hi All. I try to use this code after the price is displayed but nothing happens... i don't get the custom fields displayed. :(

my-position

needs to be changed to YOUR position
I do NOT do development work for hire.

pnaugh

  • Beginner
  • *
  • Posts: 3
Re: Custom field layout position VM 2.0.1
« Reply #21 on: June 14, 2013, 02:01:25 am »
Sorry for such an easy question, however I just am not quite getting how to do this. What I see with my custom fields are that they are too close together one on top of the other. I may have missed this but is there a way to space then apart in the vertical directions a few px? I have 3-6 custom fields for each product and it looks cluttered.

Thanks in advance for any responsed

Peter

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #22 on: June 14, 2013, 10:51:41 am »
Sorry for such an easy question, however I just am not quite getting how to do this. What I see with my custom fields are that they are too close together one on top of the other. I may have missed this but is there a way to space then apart in the vertical directions a few px? I have 3-6 custom fields for each product and it looks cluttered.

Thanks in advance for any responsed

Peter

which fields?
http://forum.virtuemart.net/index.php?topic=102850.0


I do NOT do development work for hire.

pnaugh

  • Beginner
  • *
  • Posts: 3
Re: Custom field layout position VM 2.0.1
« Reply #23 on: June 14, 2013, 15:49:10 pm »
Pro Thank You


Christopher

  • Jr. Member
  • **
  • Posts: 93
    • CDTi
Re: Custom field layout position VM 2.0.1
« Reply #24 on: June 21, 2013, 11:21:42 am »
Hello

I'm trying to alter the CSS in vmsite-ltr.css around line 202 - 209, to format the custom fields into columns by setting the widths of:

product-fields-title
product-field-display
product-field-desc

... But none of my changes appear to make any difference.... Have I missed something? I have multiple custom fields displayed for each product, each with a title, listbox and description - all I want to do is set the width of each of these to either 33% or 220px so they appear one beneath the other in neat columns - Please see the screenshot attached

Please can someone point me in the right direction?

Thanks in advance

[attachment cleanup by admin]
There are 10 types of people in the world:
Those who understand binary and those who don't

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10293
  • VirtueMart Version: 3+
Re: Custom field layout position VM 2.0.1
« Reply #25 on: June 21, 2013, 19:14:32 pm »
Hello

I'm trying to alter the CSS in vmsite-ltr.css around line 202 - 209, to format the custom fields into columns by setting the widths of:

product-fields-title
product-field-display
product-field-desc

... But none of my changes appear to make any difference.... Have I missed something? I have multiple custom fields displayed for each product, each with a title, listbox and description - all I want to do is set the width of each of these to either 33% or 220px so they appear one beneath the other in neat columns - Please see the screenshot attached

Please can someone point me in the right direction?

Thanks in advance

you are in the wrong thread for cart variant custom fields.

BUT!

why not edit the

default_addtocart.php

???


and just add your own class?

http://forum.virtuemart.net/index.php?topic=90935.0
I do NOT do development work for hire.

t68

  • Jr. Member
  • **
  • Posts: 132
Re: Custom field layout position VM 2.0.1
« Reply #26 on: October 29, 2013, 11:34:29 am »

OR, you can do your own location

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

This worked like a charm for me! I added two new positions in my default_addtocart.php override so now I can ad more custom fields to the right of the image before and after the default positions for custom fields. I named these "custom1" and "custom2" and put the coding above right after (for custom1) the start div: <div class="product-fields"> and right before its closing (for custom2) </div>. Great for adding more info about how my price-per-letter input works and so on.

kennethrules

  • Beginner
  • *
  • Posts: 12
    • Quality Freelance Web Designer
  • Skype Name: kennethrules27
  • VirtueMart Version: 2.6.6
Re: Custom field layout position VM 2.0.1
« Reply #27 on: September 10, 2014, 16:54:09 pm »
PRO thanks for big help.. I have project right now and I need this ^_^..

BrickLee47

  • Beginner
  • *
  • Posts: 1
Re: Custom field layout position VM 2.0.1
« Reply #28 on: September 25, 2014, 16:10:49 pm »
   <?php
   // Product Description
   if (!empty($this->product->product_desc)) {
       ?>
        <div class="product-description">
   <?php /** @todo Test if content plugins modify the product description */ ?>
       <span class="title"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE') ?></span>
   <?php echo $this->product->product_desc; ?>
        </div>
   <?php
    } // Product Description END

    if (!empty($this->product->customfieldsSorted['normal'])) {
   $this->position = 'normal';
   echo $this->loadTemplate('customfields');
    } // Product custom_fields END
    // Product Packaging
    $product_packaging = '';
    if ($this->product->product_box) {
   ?>
        <div class="product-box">
       <?php
           echo JText::_('COM_VIRTUEMART_PRODUCT_UNITS_IN_BOX') .$this->product->product_box;
       ?>
        </div>
       <?php if (!empty($this->product->customfieldsSorted['my-position'])) {
       $this->position='my-position';
       echo $this->loadTemplate('customfields');
       }
       ?>
    <?php } // Product Packaging END
    ?>

Using this code snippet in PHP was a bad experience for me

kelecz

  • Beginner
  • *
  • Posts: 49
    • Staffy
Re: Custom field layout position VM 2.0.1
« Reply #29 on: January 17, 2015, 20:46:37 pm »
Need assist. My problem is on the pisture. I can not add fields,no problem with "creating" custom field, Cart Variant.
Is that Jquery problem? I already have some mess with popups but now is fine.


THX in advance.

Joomla 2.5.28
VM 2.6.14
Live www.petproba.konji.rs

[attachment cleanup by admin]
staffy.mrpet.rs