VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: naisly on March 13, 2013, 01:20:42 AM

Title: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 13, 2013, 01:20:42 AM
I am not a developer nor a programer so please go easy on me =)

Joomla - 2.5.4
Virtuemart - 2.0.18a
PHP - 5.3.21

Website in question: https://rawrain.com/index.php/shop/wedding-favor (https://rawrain.com/index.php/shop/wedding-favor)

I honestly have tried using your search function, but have yet to find anything relating to my issues.

Questions:
1. Layout for custom fields look 'funny' I take it the : (colon) next to the text box is not supposed to be there? Or the heading for the field is supposed to be to the left of the text box? How do I fix this?
2. Layout for the image colors is to far to the left, how do I move that over to the right a bit? And how do I remove the radio button?
3. I cannot publish any custom field if I do not check 'Yes' for - Cart Attribute, how do I fix this?
4. I did try adding 0.0001 as mentioned in another post but it just made it worse. Now I can't even add only a '0' Oddly it saves it like this - 0.00010 <--It adds an extra 0
5. If you do fill in the fields on the front end, it shows in cart 4x - IE: John and KimJuly 21/2013Thank you for sharing in our celebration! x4 Whats worse is there are no spaces as shown in my example.

I sure hope someone can help me, I have been at this for over a year now and in the next few days I will be doing some major marketing for the site and hope to have this cleaned up a bit by then.

Thank you all for your time,

~Naisly
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 13, 2013, 02:25:08 AM
http://forum.virtuemart.net/index.php?topic=99225.0
http://forum.virtuemart.net/index.php?topic=97419.0


"cart variants"
show by the add to cart button.

They are also passed onto the cart when you add to cart

you need to assign a "position" to regular custom fields that are not cart variants.

.01   ?

as for the cart view being all in 1 line with multiple text inputs

YOpu have to change

plugins/vmcustom/textinput/textinput.php

Down in this function
function plgVmOnViewCart($product,$row,&$html) {

You have to change this
   $html .='<span>'.JText::_($product->productCustom->custom_title).' '.$item['comment'].'</span>';

to this
   $html .='<p>'.JText::_($product->productCustom->custom_title).' '.$item['comment'].'</p>';


I see you have some template overrides already. did you buy this template? or do them yourself?
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 13, 2013, 03:06:45 AM
Thank you so very much for helping.
Quote
you need to assign a "position" to regular custom fields that are not cart variants.

I did try this, with same result - Does not show up on front end.

Quote.01   ?

I tried this as well and many other variations. Still adds a '0' in this case - .0100 Yet, I still can not save the default of '0'. Doesn't really matter anyways, I don't want any Cart Attributes (at least for this web page) - What I really need is for all these fields to be free for the client.

Quoteplugins/vmcustom/textinput/textinput.php

Am I in the right spot? It doesn't look the same =\

function plgVmOnViewCart($product,$row,&$html) {
      if (!$plgParam = $this->GetPluginInCart($product)) return '' ;

      $html  .= '<div>';
      foreach($plgParam as $k => $item){
         if(!empty($item['comment']) ){
            $html .='<span>'.$item['comment'].'</span>';
         }
       }
      $html .='</div>';

      return true;


Yes, I did purchase the template.
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 13, 2013, 19:16:53 PM
you need to update your "all in one" component.

Thats probably an old version.
I do think some problems you have with it have been fixed.



&& if you look in

views/productdetails/tmpl/default.php

YOU should see the "position" names

Default vmart has

ontop   
normal
onbot
Title: Re: Questions: Custom Fields-Price/layout/Cart
Post by: naisly on March 13, 2013, 21:53:39 PM
Thank you again for your help.

Quoteyou need to update your "all in one" component.
Silly question, but what is 'all in one' component?

Yesterday I did try the default ontop, normal, onbot positions while making a new custom field type - string. Titled it - ontop, Cart Attribute - No, Layout Position - ontop. I did try this for the 3 positions and still nothing would show on the front end until I changed Cart Attribute - Yes. Did I do this right?

I did go through views/productdetails/tmpl/default.php and found the coding is different than what you posted in http://forum.virtuemart.net/index.php?topic=97419.0 (http://forum.virtuemart.net/index.php?topic=97419.0) mine looks like:

    if (!empty($this->product->customfieldsSorted['onbot'])) {

       $this->position='onbot';

       echo $this->loadTemplate('customfields');

    } // Product Custom ontop end

    ?>

I'm not a programer and could be off here, but my code seems to be missing stuff? And shouldn't it be - Product Custom onbot end?

I also changed:

$html  .= '<div>';
      foreach($plgParam as $k => $item){
         if(!empty($item['comment']) ){
            $html .='<span>'.$item['comment'].'</span>';
         }
       }
      $html .='</div>';

      return true;

To:

$html  .= '<div>';
      foreach($plgParam as $k => $item){
         if(!empty($item['comment']) ){
            $html .='<p>'.$item['comment'].'</p>';
         }
       }
      $html .='</div>';

      return true;

The only thing this changed was now at least there are spaces in between the words. But it is still multiplying 4x.
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 14, 2013, 13:32:44 PM
here is the latest aio component
http://virtuemart.net/component/ars/repository/virtuemart-2-aio/virtuemart-2-aio-2-0-18a/com_virtuemart.2.0.18a_ext_aio.zip

AIO component has all the modules & plugins
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 15, 2013, 07:38:07 AM
That worked pretty well, thank you for that.

The multiplying issue is gone (thank goodness).

Colons ( : ) are gone.

Only thing it didn't fix was the Cart Attribute still needs to be set to 'Yes' for anything to show. That pesky radio button is driving me nuts.
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 15, 2013, 17:05:14 PM
this will be a template issue

You need to update your template codes

You can look in the default files to see the new ones.


You can set your user in administrator to show a different template.

Then look on the front end (while logged in), and see if they appear then
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 16, 2013, 19:25:54 PM
Thank you.

I did change to a default page - It sort of is working. String, Image,  product specification etc. fields work fine but not customer text input or dropbox plugin, I still need to add Yes to cart attribute.

You can have a look here if you wish - https://rawrain.com/index.php/shop/wedding-favor#featured2 (https://rawrain.com/index.php/shop/wedding-favor#featured2)

I asked over at my templates forum and they said it was VM. I did update VM to 2.0.20a (didn't help), I also tried a new default.php file (didn't help).

I honestly don't know what to try now. =\
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 17, 2013, 02:07:29 AM
I see ontop & onbot
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 17, 2013, 03:59:55 AM
Quote from: PRO on March 17, 2013, 02:07:29 AM
I see ontop & onbot

Yes that is right, but not customer text input or dropbox plugin, I still need to add Yes to cart attribute.

So after all is said and done, this is what I know:

Cart Attrubute: No/Any Position
1. String, Image,  product specification Work only on Default template.

Cart Attribute: Yes/No Position
2. Customer text input or dropbox plugin fields do not work in either (Default or eCommerce) template unless Cart Attribute: Yes

Default Template
3. Product Specification field->Cart attribute:No->Layout Position:ANY works

My Template
4. Product Specification field->Cart attribute:No->Layout Position:ANY  Does not work  IF->Cart Attribute:Yes->only title shows

I need them to have No cart attribute and able to set in a position.



Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 17, 2013, 14:21:36 PM
Quote from: naisly on March 17, 2013, 03:59:55 AM

Cart Attribute: Yes/No Position
2. Customer text input or dropbox plugin fields do not work in either (Default or eCommerce) template unless Cart Attribute: Yes




these field types ARE a cart variant

Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 17, 2013, 17:05:57 PM
Quotethese field types ARE a cart variant

I do understand this (and beginning to think this) - But...

QuoteCart Attribute: No/Any Position
1. String, Image, product specification Work only on Default template.

They Do Not work on my template.

Example - Each web page had the same custom fields assigned.
Default Page - Works (https://rawrain.com/index.php/shop/wedding-favor)
My Template - Does Not Work (https://rawrain.com/index.php/shop)

The only way I can get the fields to show on My Template are - Cart Attribute:Yes
And even then, I cannot position them.



[attachment cleanup by admin]
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 18, 2013, 01:41:15 AM
Quote from: PRO on March 15, 2013, 17:05:14 PM


You need to update your template codes

You can look in the default files to see the new ones.




^^^^^
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: naisly on March 18, 2013, 03:26:12 AM
I would like to start by saying thank you very much for all you have done and to put up with all my questions.

A couple of days ago I did ask them. They said there are no updates because everything works fine. The only solution they gave me was a new default.php file. Which I have installed and this didn't correct the problem either.

I've spent a year trying to correct this issue. I just don't know what else I can do to convince them it is their template. They seem to think it is VM. But with your help and kindness, we figured (well you) it is more than likely the template.

I just don't know where else to look....
Title: Re: Qestions: Custom Fields-Price/layout/Cart
Post by: PRO on March 18, 2013, 23:56:08 PM
This template is WAAY out of date

Vmart does not use modal anymore
There are NO layout position in the template
The file does not even use seperate files for addtocart etc.

http://forum.virtuemart.net/index.php?topic=97419.0
http://forum.virtuemart.net/index.php?topic=98505.0

Its over a year behind.