Hello,
how can I customize client custom fields?
in particular I want to insert two radio bottons that make me appear other fields
Insert screenshots of the fields to add
how can I do?
use a chk box but over ride the element display in the template over ride, cart default_cartfields.php
hi,
can you have a small example or guide?
thank you
in the display loop detect "your" shopper field and render it differently
there is from memory already the T&C's field handled differently
hi,
its ok...
please,
a small example of override for VirtueMart of the default_cartfields.php file
Thanks You
<?php
if ($field['hidden'] == true) {
// We collect all hidden fields
// and output them at the end
$hiddenFields .= $field['formcode'] . "\n";
} esleif ($field['name'] == 'yours') {
/* make your radios*/
} else { ?>
<?php echo $field['formcode'] ?>
</div>
<?php } ?>
hi,
thanks a lot for the suggestion,
this code is to be included in the default_cartfields.php file?
thanks you
have u even opened the file and had a look?
Be more proactive.. u can't expect free bespoke coding
Problem solved..
for hidden fileds in default_shopper o default_cart add this code in foreach {
if($singlefield['name']=='company'){
echo "<div class='opg-width-1-1' style='display:none;' id='hide1'>";
}elseif($singlefield['name']=='CF_PIVA'){
echo "<div class='opg-width-1-1' style='display:none;' id='hide2'>";
}else{
echo "<div class='opg-width-1-1'>";
}
the radiobutton also
if($singlefield['type'] == "radio")
{
echo "Register as a Business";
}
this is jQuery function for gestions switch SHOW/HIDDEN
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// $(function(){
$('input:radio[name="NAME OF RADIO BOTTON"]').change(function(){
//$('#fatt_si_no1').on(function(){
if($(this).val() == '1'){
if( $('#hide1').css('display') == 'block' )
$('#hide1').css('display','none');
else
$('#hide1').css('display','block');
//return false;
if( $('#hide2').css('display') == 'block' )
$('#hide2').css('display','none');
else
$('#hide2').css('display','block');
//return false;
}
if($(this).val() == '0'){
if( $('#hide1').css('display') == 'block' )
$('#hide1').css('display','none');
else
$('#hide1').css('display','block');
//return false;
if( $('#hide2').css('display') == 'block' )
$('#hide2').css('display','none');
else
$('#hide2').css('display','block');
//return false;
}
});
});
</script>
that's all
bye