Page 1 of 1

VirtueMart next button not visible in FF

Posted: Tue Mar 30, 2010 3:12 am
by jbmaca
Hi,

For some reason, the next button for the VM "select shipping address" checkout step doesn't appear in Firefox and Safari. What's strange though is that it does appear for all the other steps. It appears to be a template issue since changing templates solves the problem - the button appears. This is the template I need to use though so have been trying to figure out what's causing it. The problem doesn't happen in IE8, Chrome or Opera.

I think the file I need to edit is checkout.index.php, specifically the lines quoted below. So far,The only way I could get the next button to appear is by changing the input type value in the line highlighted below to anything but hidden. This however creates a new input box, button, etc depending on what I put in. Can someone please help by pointing me in the right direction? Am I editing the right line of code? Many thanks in advance for the help.

Here's the website: http://www.dibetto.com
// CHECK_OUT_GET_SHIPPING_ADDR

// Lets the user pick or add an alternative Shipping Address

if( in_array('CHECK_OUT_GET_SHIPPING_ADDR', $checkout_steps[$current_stage]) ) {

echo '<a name="CHECK_OUT_GET_SHIPPING_ADDR"></a>';

echo $theme->fetch( 'checkout/get_shipping_address.tpl.php');

$theme->set('basket_html', '');

}

// CHECK_OUT_GET_SHIPPING_METHOD

// Let the user pick a shipping method

if( in_array('CHECK_OUT_GET_SHIPPING_METHOD', $checkout_steps[$current_stage]) ) {

echo '<a name="CHECK_OUT_GET_SHIPPING_METHOD"></a>';

echo $theme->fetch( 'checkout/get_shipping_method.tpl.php');

$theme->set('basket_html', '');

}



// -CHECK_OUT_GET_PAYMENT_METHOD

// let the user choose a payment method

if( in_array('CHECK_OUT_GET_PAYMENT_METHOD', $checkout_steps[$current_stage]) ) {

echo '<a name="CHECK_OUT_GET_PAYMENT_METHOD"></a>';

echo $theme->fetch( 'checkout/get_payment_method.tpl.php');

$theme->set('basket_html', '');

}

// -CHECK_OUT_GET_FINAL_CONFIRMATION

// shows a total summary including all payments, taxes, fees etc.

if( in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {

echo '<a name="CHECK_OUT_GET_FINAL_CONFIRMATION"></a>';

// Now let the user confirm

echo $theme->fetch( 'checkout/get_final_confirmation.tpl.php');

$theme->set('basket_html', '');

}

?>

<br /><?php

foreach( $checkout_steps[$current_stage] as $this_step ) {

echo '<input type="hidden" name="checkout_this_step[]" value="'.$this_step.'" />';

}



// Set Dynamic Page Title: "Checkout: Step x of x"

$ii = 0;

for( $i = 1; $i < 5; $i++ ) {

if( isset( $checkout_steps[$i] ) ) {

$ii += 1;

if( in_array($this_step, $checkout_steps[$i] ) ) {

$mainframe->setPageTitle( sprintf( $VM_LANG->_('VM_CHECKOUT_TITLE_TAG'), $ii, count($checkout_steps) ));

break;

}

}

}



if( !in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {

?>

<div align="center">

<input type="submit" class="button" name="formSubmit" value="<?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_NEXT');?> >>" />

</div>

Re: VirtueMart next button not visible in FF

Posted: Wed Mar 31, 2010 1:15 am
by jbmaca
anyone?

Re: VirtueMart next button not visible in FF

Posted: Sat May 29, 2010 1:54 pm
by jlucey1
Note the Red text, I have added a HTML Hard space to the layout and this cured the issue for me in FireFox and Safari. Hope it helps you out a bit!! Cheers!


<br /><?php
foreach( $checkout_steps[$current_stage] as $this_step ) {
echo '<input type="hidden" name="checkout_this_step[]" value="'.$this_step.'" />';;
}


// Set Dynamic Page Title: "Checkout: Step x of x"
$ii = 0;
for( $i = 1; $i < 5; $i++ ) {
if( isset( $checkout_steps[$i] ) ) {
$ii += 1;
if( in_array($this_step, $checkout_steps[$i] ) ) {
$mainframe->setPageTitle( sprintf( $VM_LANG->_('VM_CHECKOUT_TITLE_TAG'), $ii, count($checkout_steps) ));
break;
}
}
}

if( !in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {
?>
&nbsp;
<div align="center">

<input type="submit" class="button" name="formSubmit" value="<?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_NEXT');?> >>" />

</div>
<?php
}
// Close the Checkout Form, which was opened in the first checkout template using the variable $basket_html
echo '</form>';

if( !in_array('CHECK_OUT_GET_FINAL_CONFIRMATION', $checkout_steps[$current_stage]) ) {
echo "<script type=\"text/javascript\"><!--
function submit_order( form ) { return true; }
--></script>";
}
}

else {

if (!empty($auth['user_id'])) {
// USER IS LOGGED IN, BUT NO REGISTERED CUSTOMER
// WE NEED SOME ADDITIONAL INFORMATION HERE,
// SO REDIRECT HIM TO shop/shopper_add
$vmLogger->info( $VM_LANG->_('PHPSHOP_NO_CUSTOMER',false) );

include(PAGEPATH. 'checkout_register_form.php');
}

else {
// user is not logged in
echo $theme->fetch( 'checkout/login_registration.tpl.php' );
}
}
}
else {
vmRedirect( $sess->url( 'index.php?page=shop.cart', false, false ) );
}

?>

Re: VirtueMart next button not visible in FF

Posted: Sat May 29, 2010 8:40 pm
by jbmaca
It worked!!! Such a simple solution too. Thank you so much jlucey1! :D :D :D