News:

Support the VirtueMart project and become a member

Main Menu

Help hiding ship to address on checkout via CSS

Started by andimint, June 28, 2015, 00:48:06 AM

Previous topic - Next topic

andimint

I'm trying to hide the "ship to" address section of the checkout process. Our business will not be shipping a physical product and it's an extra *thing* I don't want our customers to see.

I've scoured the forums and the best solution appears to be simply hide it using CSS....but I can't find the right file or code.

This post (http://forum.virtuemart.net/index.php?topic=127121.0) indicates the solution for VM2 will work for VM3, and I was hoping the code mentioned here (https://forum.virtuemart.net/index.php?topic=119571.0) would work for VM3, but it doesn't. I've scoured the VM3 files and can't find it anywhere.

When I couldn't find the file/code to hide the div, I used language overrides to leave the text blank. That worked great at concealing the ship to address, but I couldn't figure out how to conceal that pesky same as billing check box/radio button (oddly, it's a check box for guest users and a radio button for logged in users).

Trying to be creative but keep hitting dead ends.

I'm a complete newbie to virtuemart. ANY help would be greatly appreciated.


VM 3.0.8
joomla  3.4.1
php 5.4.37
no live site, on localhost right now

andimint

#1
FINALLY!! The solution, in case anyone else is struggling like I did.


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


Look for the following code (line 68 for me):

<div class="width50 floatleft">

      <span><span class="vmicon vm2-shipto-icon"></span>
         <?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?></span>
      <?php // Output Bill To Address ?>
      <div class="output-shipto">


And change the first line to:

<div class="width50 floatleft" style="display:none;">

      <span><span class="vmicon vm2-shipto-icon"></span>
         <?php echo vmText::_ ('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL'); ?></span>
      <?php // Output Bill To Address ?>
      <div class="output-shipto">


In the version I have, there was a typo in the comments. "Output Bill To Address" is commented twice, when the second occurrence should probably say "Output Ship To Address." No big deal, just something to be mindful of as you're locating the shipping portion of the code (if line numbers don't match).


Oh, and of course:::::Use an override! :)