adding more info click to custom fields?

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #18793

i would like to add a link right after to the field of the order custom fields. check out the image.

the idea is to have a link that will be a lightbox window with more information about what we are asking for in the field.

should be a core feature :)

anyway for now i just need to make it happen though, any ideas of the easiest way to implement it?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #18802

You can go in the menu Display->Views and edit the file custom_fields of the view checkout. There, you can add your help link after the display function call on the custom field.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #18865

thanks but how would this work if some are going to need a help link others not.. and the help link is different for each one that has it.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #18873

you can easily do that... :

if($fieldName=='my_custom_field_column_name_1'){
echo '<a href="http://helplink1" target="_blank">Help link</a>';
}

if($fieldName=='my_custom_field_column_name_2'){
echo '<a href="http://helplink2" target="_blank">Help link</a>';
}

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #18881

Thanks,

on the same subject in the view fields of check out the main php code is this

<?php
if(!empty($this->extraFields)){
$this->setLayout('custom_fields');
$this->type = 'order';
echo $this->loadTemplate();
}
?>

i would assume this is loading the fields of the table order. i want to control which field load and which don't in other words i want to know what is the code to echo each field separately. i need them in specific places on the page. and this throws it all in a table.

so
How do i echo 1 field of the table order?

What i want to end up having is a radio box list that when they select their option the correct fields are displayed, when filled and they are submitted normally.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #18894

Suppose that your custom field column name is "column_name", you can do like that:

echo $this->fieldsClass->display($this->extraFields,$this->order->column_name,'data[order][column_name]');

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19078

is there anything special i need to do in order to have it work normally as it would with the next button and the information being submitted? i want to redesign the whole fields step, i want to comment out this

if(!empty($this->extraFields['order'])){
$this->setLayout('custom_fields');
$this->type = 'order';
echo $this->loadTemplate();
}

and lay them out one by one using the code you provided. would this work?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19079

That should work.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19094

hey, this code

echo $this->fieldsClass->display($this->extraFields,$this->order->column_name,'data[order][column_name]');

doesn't print out the label.

i am using span with strings for now.. let me know.. thanks.. also i am not eachoing any custom text fields and i am getting the some problem as i posted earlier.

this is what i created

        echo ("<div class=\"1phonenplan\">" ),("<h4>1 - Activate your iQ phone and Plan</h4>"),("<br />"),
      ("<span id=\"iwant\">I want to</span>"),$this->fieldsClass->display($this->extraFields['order']['activate_iqphone'],$this->order->activate_iqphone,'data[order][activate_iqphone]'),("<br />"),
      ("<span id=\"phonenumber\">Phone Number</span>"),  $this->fieldsClass->display($this->extraFields['order']['phone_number'],$this->order->phone_number,'data[order][phone_number]'),("<br />"),
       ("<span id=\"carrier\">Carrier</span>"), $this->fieldsClass->display($this->extraFields['order']['carrier'],$this->order->carrier,'data[order][carrier]'),("<br />"),
     ("<span id=\"acctnumber\">Account Number</span>"), $this->fieldsClass->display($this->extraFields['order']['account_number'],$this->order->account_number,'data[order][account_number]'),("<br />"),
     ("<span id=\"Pin\">Pin</span>"), $this->fieldsClass->display($this->extraFields['order']['pin'],$this->order->pin,'data[order][pin]'),("<br />"),
      ("<span id=\"SSN\">SSN</span>"), $this->fieldsClass->display($this->extraFields['order']['ssn'],$this->order->ssn,'data[order][ssn]'),("<br />"),
        ("</div>");
      
      echo ("<br />"),("<div class=\"2myphone\">" ),("<h4>2 - Activate iQ Plan on my existing phone</h4>"),("<br />"),("<span id=\"2myphonesub\">You will need your ESN(?) and MSL(?).</span>"),("<br />"),
      ("<br />"),
      ("<span id=\"esnnumber\">ESN</span>"),  $this->fieldsClass->display($this->extraFields['order']['esnnumber'],$this->order->esnnumber,'data[order][esnnumber]'),("<br />"),
      ("<span id=\"mobile_serial_lock_code\">MSL</span>"),  $this->fieldsClass->display($this->extraFields['order']['mobile_serial_lock_code'],$this->order->mobile_serial_lock_code,'data[order][mobile_serial_lock_code]'),("<br />"),
      ("<span id=\"iwant\">I want to</span>"),$this->fieldsClass->display($this->extraFields['order']['activate_iqphone'],$this->order->activate_iqphone,'data[order][activate_iqphone]'),("<br />"),
      ("<span id=\"phonenumber\">Phone Number</span>"),  $this->fieldsClass->display($this->extraFields['order']['phone_number'],$this->order->phone_number,'data[order][phone_number]'),("<br />"),
      ("<span id=\"carrier\">Carrier</span>"), $this->fieldsClass->display($this->extraFields['order']['carrier'],$this->order->carrier,'data[order][carrier]'),("<br />"),
     ("<span id=\"acctnumber\">Account Number</span>"), $this->fieldsClass->display($this->extraFields['order']['account_number'],$this->order->account_number,'data[order][account_number]'),("<br />"),
     ("<span id=\"Pin\">Pin</span>"), $this->fieldsClass->display($this->extraFields['order']['pin'],$this->order->pin,'data[order][pin]'),("<br />"),
      ("<span id=\"SSN\">SSN</span>"), $this->fieldsClass->display($this->extraFields['order']['ssn'],$this->order->ssn,'data[order][ssn]'),("<br />"),
        ("</div>");   
    
    
      echo ("<br />"),("<div class=\"3newiqplan\">" ),("<h4>3 - I am An existing iq customer already, active my new plan iQ plan on my existing iQ phone.</h4>"),("<br />"),
      /**("<span id=\"3newiqplansub\">You will need your ESN(?) and MSL(?).</span>"),("<br />"),*/
      ("<span id=\"iqaccount \">iQ Account</span>"),  $this->fieldsClass->display($this->extraFields['order']['iqaccount'],$this->order->iqaccount,'data[order][iqaccount ]'),("<br />"),
      ("<span id=\"ein\">EIN</span>"),  $this->fieldsClass->display($this->extraFields['order']['ein'],$this->order->ein,'data[order][ein]'),("<br />"),
      ("<span id=\"iwant\">I want to</span>"),$this->fieldsClass->display($this->extraFields['order']['activate_iqphone'],$this->order->activate_iqphone,'data[order][activate_iqphone]'),("<br />"),
      ("<span id=\"phonenumber\">Phone Number</span>"),  $this->fieldsClass->display($this->extraFields['order']['phone_number'],$this->order->phone_number,'data[order][phone_number]'),("<br />"),
      ("<span id=\"carrier\">Carrier</span>"), $this->fieldsClass->display($this->extraFields['order']['carrier'],$this->order->carrier,'data[order][carrier]'),("<br />"),
     ("<span id=\"acctnumber\">Account Number</span>"), $this->fieldsClass->display($this->extraFields['order']['account_number'],$this->order->account_number,'data[order][account_number]'),("<br />"),
     ("<span id=\"Pin\">Pin</span>"), $this->fieldsClass->display($this->extraFields['order']['pin'],$this->order->pin,'data[order][pin]'),("<br />"),
      ("<span id=\"SSN\">SSN</span>"), $this->fieldsClass->display($this->extraFields['order']['ssn'],$this->order->ssn,'data[order][ssn]'),("<br />"),
        ("</div>");
      
        echo ("<br />"),("<div class=\"4newiqphone\">" ),("<h4>4 - I am An existing iq customer already, active my new plan iQ phone on my existing iQ plan.</h4>"),("<br />"),
      /**("<span id=\"4newiqphonesub\">You will need your ESN(?) and MSL(?).</span>"),("<br />"),*/
      ("<span id=\"iqaccount \">iQ Account</span>"),  $this->fieldsClass->display($this->extraFields['order']['iqaccount '],$this->order->iqaccount ,'data[order][iqaccount ]'),("<br />"),
      ("<span id=\"iwant\">I want to</span>"),$this->fieldsClass->display($this->extraFields['order']['activate_iqphone'],$this->order->activate_iqphone,'data[order][activate_iqphone]'),("<br />"),
      ("<span id=\"phonenumber\">Phone Number</span>"),  $this->fieldsClass->display($this->extraFields['order']['phone_number'],$this->order->phone_number,'data[order][phone_number]'),("<br />"),
      ("<span id=\"carrier\">Carrier</span>"), $this->fieldsClass->display($this->extraFields['order']['carrier'],$this->order->carrier,'data[order][carrier]'),("<br />"),
     ("<span id=\"acctnumber\">Account Number</span>"), $this->fieldsClass->display($this->extraFields['order']['account_number'],$this->order->account_number,'data[order][account_number]'),("<br />"),
     ("<span id=\"Pin\">Pin</span>"), $this->fieldsClass->display($this->extraFields['order']['pin'],$this->order->pin,'data[order][pin]'),("<br />"),
      ("<span id=\"SSN\">SSN</span>"), $this->fieldsClass->display($this->extraFields['order']['ssn'],$this->order->ssn,'data[order][ssn]'),("<br />"),
        ("</div>");
      


i tested the step with no code and i had the same issue with the flickering in step 4 which becomes step 5 then if i click next again it sends me back to step 2, also i tested it with just one field, and the same issue. the code for that looked like this


echo    
      ("<span id=\"iwant\">I want to</span>"),$this->fieldsClass->display($this->extraFields['order']['activate_iqphone'],$this->order->activate_iqphone,'data[order][activate_iqphone]');


Thank you in advance...

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19110

The label can be displayed with:
echo $this->fieldsClass->getFieldName($this->extraFields);

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19121

How about the please_fill_addiotional_information problem? Any reason why this keeps happing to me ;(?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19122

That's because of the check of that custom field type. That's a new type of custom fields that we introduced in last release and there are still some hickups when using it. That's why I recommended you to not use it for now.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19124

The radio check custom field type?

Well like I said above I tested it with no fields being echoed and I was still having the issue. I. also tested it just with a text field and still the same issue. This form is really important in my case so I need to get it working nicolas, would you like back-end access to help move this along?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19129

Yes. Please send it via our contact form so that I can have a look. Also, an FTP access might be needed in order to correct the problem if it is indeed because of a bug.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19171

hey , so what seems to be causing this issue? let me know if there is anything i can do.

Last edit: 13 years 5 months ago by Rickhavoc.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19172

I had a look but I couldn't find the problem, your settings seems fine. We would need to add debug traces on the checkout files in order to find the problem and for that we will need an FTP access.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19176

i'll send you log in information to the cpanel of it.. the ftp is not going to work cause the domain is not pointing to the server at the moment.


Edit-- login info has been sent.

Last edit: 13 years 5 months ago by Rickhavoc.

Please Log in or Create an account to join the conversation.

  • Posts: 156
  • Thank you received: 0
13 years 5 months ago #19184

any luck my friend?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19185

We didn't had yet the time to look at it.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19189

We put some traces and found out that the data is good on HikaShop's end but that joomla does not stores the variables that HikaShop gives it in the session. Which results in HikaShop believing that the custom fields have not been filled.
That can happens sometimes on servers with a specific configuration and with the session handler being the database. Usually, changing the database handler to "none" in the joomla configuration solves the problem without any drawbacks.
We can't access the configuration of your website and can't modify the configuration.php file so we couldn't test that.
Please change it yourself and logout/login from the front end and try again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum