VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: andrai2 on April 17, 2015, 20:20:54 PM

Title: How to remove Save buttons from one page chekout cart..?
Post by: andrai2 on April 17, 2015, 20:20:54 PM
Hello!

I would like to ask how can i remove save buttons from one page chekout cart?

To clearify my idea i have add an image, those buttons are good, but may mislead customer for extra click.

I try to modify this file but probably doing something wrong components/com_virtuemart/views/cart/tmpl/default.php

    $taskRoute = '';
    ?><form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::('index.php?option=com_virtuemart&view=cart' $taskRoute$this->useXHTML$this->useSSL); ?>">
        <?php
        
if(VmConfig::get('multixcart')=='byselection'){
            if (!
class_exists('ShopFunctions')) require(VMPATH_ADMIN DS 'helpers' DS 'shopfunctions.php');
            echo 
shopFunctions::renderVendorFullVendorList($this->cart->vendorId);
            
?>
<input type="submit" name="updatecart" title="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" value="<?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?>" class="button"  style="margin-left: 10px;"/><?php


Maybe great community can help me...?

Joomla 3.3.6
VirtueMart 3.0.2
Artisteer template
Site is multilangiage
Title: Re: How to remove Save buttons from one page chekout cart..?
Post by: GJC Web Design on April 18, 2015, 12:23:42 PM
You can remove them but then what? 

They are there for a reason -- to save the choice of ship and pay..
Title: Re: How to remove Save buttons from one page chekout cart..?
Post by: andrai2 on April 21, 2015, 16:59:39 PM
The problem is that "Save" buttons in the cart generate two extra clicks for customer, and if client press "chek ou"t than shipment and payment are saved anyway, and it shows in the "confirmation e-mail"

I manege to remove these buttons modify thes files
components/com_virtuemart/views/cart/tmpl/select_shipment.php

components/com_virtuemart/views/cart/tmpl/select_payment.php

i deleted this code

<div class="buttonBar-right">

        <button  name="updatecart" class="<?php echo $buttonclass ?>" type="submit" ><?php echo vmText::_('COM_VIRTUEMART_SAVE'); ?></button>  &nbsp;
<?php   if ($this->layoutName!='default') { ?>
<button class="<?php echo $buttonclass ?>" type="reset" onClick="window.location.href='<?php echo JRoute::_('index.php?option=com_virtuemart&view=cart&task=cancel'); ?>'" ><?php echo vmText::_('COM_VIRTUEMART_CANCEL'); ?></button>
<?php  ?>
</div>


I would like to ask is it reight to remove these buttons..?

The only problem is when client by accident pres "chek out"  when no shipment and payment selected than it links to selec shipment screen with no buttons :(

It looks lot of coding, but is it possible to remove "save" buttons only in cart...?

Title: Re: How to remove Save buttons from one page chekout cart..?
Post by: GJC Web Design on April 21, 2015, 22:09:01 PM
hide them by css just in the cart?
Title: Re: How to remove Save buttons from one page chekout cart..?
Post by: andrai2 on April 24, 2015, 12:47:34 PM
Thanks!

ok css display none; i do like this it hides save buttons in cart

.buttonBar-right{display:none;text-align: right; float:right;}

p.s. maybe the only thing is, if client dont select shipment and payment in one page chekout screen, and press chekout, than payment and shipment screen pops out with no buttons,  but anyway its good for me know

Thanks agains!