News:

Support the VirtueMart project and become a member

Main Menu

Qestions: Custom Fields-Price/layout/Cart

Started by naisly, March 13, 2013, 01:20:42 AM

Previous topic - Next topic

naisly

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

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

PRO

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?

naisly

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.

PRO

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

naisly

#4
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 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.

PRO


naisly

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.

PRO

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

naisly

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

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. =\

PRO


naisly

#10
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.




PRO

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


naisly

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
My Template - Does Not Work

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]

PRO

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.




^^^^^

naisly

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....