News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Remove login from page top on edit billing address page

Started by Philip Bainbridge, April 14, 2020, 20:13:12 PM

Previous topic - Next topic

Philip Bainbridge

the checkout as guest and login area is shown at page top and bottom when on edit billing address page when not logged in .

I only want to show it at the form bottom and not the top

So i want to remove checkout as guest and login from form top.
Can be seen on this page here
https://onetigrisdog.co.uk/my-profile/editaddresscartbt/editaddresscartBT

See image attached
I want the red area gone and want to replace with adding some text "Please only fill out the top section (Mobile phone, Username, Displayed name, Password and Confirm password) if you wish to create an account with us."

in the second image the green area i want to keep but every edit i make removes both sections,,
i believe the file i need to edit is in template override - joomlaroot/templates/mytemplate/html/com_virtuemart/users/edit_address.php


All help greatly appreciated latest vm version

Jörgen

Checkout your template/HTML/com_virtuemart/
Standard Joomla overrides. Most of The File names are self explanatory.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Philip Bainbridge

Quote from: Jörgen on April 14, 2020, 20:52:26 PM
Checkout your template/HTML/com_virtuemart/
Standard Joomla overrides. Most of The File names are self explanatory.
Jörgen

hey buddy i just edited my post..

i believe i have the file but when i remove from top the bottom goes aswell and on some scenarios i tried to change i get 404

Philip Bainbridge

#3
Below is the code from my template override

<?php
/**
 *
 * Enter address data for the cart, when anonymous users checkout
 *
 * @package    VirtueMart
 * @subpackage User
 * @author Oscar van Eijk, Max Milbers
 * @link https://virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: edit_address.php 9578 2017-06-13 13:03:32Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined ('_JEXEC') or die('Restricted access');

// Implement Joomla's form validation
vmJsApi::vmValidator();
vmJsApi::css('vmpanels');

if (!
class_exists('VirtueMartCart')) require(VMPATH_SITE DS 'helpers' DS 'cart.php');
$this->cart VirtueMartCart::getCart();
$url 0;
if (
$this->cart->_fromCart or $this->cart->getInCheckOut()) {
$rview 'cart';
}
else {
$rview 'user';
}

function 
renderControlButtons($view,$rview){
?>
<hr />
<div class="control-buttons">
<?php


if (
$view->cart->getInCheckOut() || $view->address_type == 'ST') {
$buttonclass 'default';
}
else {
$buttonclass 'button vm-button-correct';
}


if (VmConfig::get ('oncheckout_show_register'1) && $view->userDetails->JUser->id == && !VmConfig::get ('oncheckout_only_registered'0) && $view->address_type == 'BT' and $rview == 'cart') {
echo '<div id="reg_text">'.vmText::sprintf ('COM_VIRTUEMART_ONCHECKOUT_DEFAULT_TEXT_REGISTER'vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'), vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST')).'</div>'; }
else {
//echo vmText::_('COM_VIRTUEMART_REGISTER_ACCOUNT');
}
if (VmConfig::get ('oncheckout_show_register'1) && $view->userDetails->JUser->id == && $view->address_type == 'BT' and $rview == 'cart') {
?>

<button name="register" class="<?php echo $buttonclass ?>" type="submit" onclick="javascript:return myValidator(userForm,true);"
title="<?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?>"><?php echo vmText::('COM_VIRTUEMART_REGISTER_AND_CHECKOUT'); ?></button>
<?php if (!VmConfig::get ('oncheckout_only_registered'0)) { ?>
<button name="save" class="<?php echo $buttonclass ?>" title="<?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?>" type="submit"
onclick="javascript:return myValidator(userForm, false);"><?php echo vmText::('COM_VIRTUEMART_CHECKOUT_AS_GUEST'); ?></button>
<?php ?>
<button class="default" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
<?php
}
else {
?>

<button class="<?php echo $buttonclass ?>" type="submit"
onclick="javascript:return myValidator(userForm,true);"><?php echo vmText::('COM_VIRTUEMART_SAVE'); ?></button>
<button class="default" type="reset"
onclick="window.location.href='<?php echo JRoute::('index.php?option=com_virtuemart&view=' $rview.'&task=cancel'); ?>'"><?php echo vmText::('COM_VIRTUEMART_CANCEL'); ?></button>
         
<?php ?>
</div><div class="clear"></div>
<?php
}

?>

<h1 style="margin-bottom:35px;"><?php echo $this->page_title ?></h1>
<?php


$task 
'';
if (
$this->cart->getInCheckOut()){
$task '&task=checkout';
}
$url 'index.php?option=com_virtuemart&view='.$rview.$task;

?>

<div class="width30 floatleft vm-cart-header">
    <div class="payments-signin-button" ></div>
</div>
<?php
//echo shopFunctionsF::getLoginForm (TRUE, FALSE, $url);

?>


<form method="post" id="userForm" name="userForm" class="form-validate" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user',$this->useXHTML,$this->useSSL?>" >
<fieldset>
<div style="margin-top:45px;" class="clear"></div><h3><?php
if ($this->address_type == 'BT') {
echo vmText::('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
}
else {
echo vmText::('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
}
?>

</h3>

<!--<form method="post" id="userForm" name="userForm" action="<?php echo JRoute::('index.php'); ?>" class="form-validate">-->
<?php renderControlButtons($this,$rview); ?>
   

<?php // captcha addition
if(VmConfig::get ('reg_captcha') && JFactory::getUser()->guest == 1){
$captcha_visible vRequest::getVar('captcha');
$hide_captcha = (VmConfig::get ('oncheckout_only_registered') or $captcha_visible) ? '' 'style="display: none;"';
?>

<fieldset id="recaptcha_wrapper" <?php echo $hide_captcha ?>>
<?php if(!VmConfig::get ('oncheckout_only_registered')) { ?>
<span class="userfields_info"><?php echo vmText::('COM_VIRTUEMART_USER_FORM_CAPTCHA'); ?></span>
<?php ?>
<?php
echo $this->captcha?>

</fieldset>
<?php }
// end of captcha addition

if (!class_exists ('VirtueMartCart')) {
require(VMPATH_SITE DS 'helpers' DS 'cart.php');
}

if (count ($this->userFields['functions']) > 0) {
echo '<script language="javascript">' "\n";
echo join ("\n"$this->userFields['functions']);
echo '</script>' "\n";
}

echo $this->loadTemplate ('userfields');
renderControlButtons($this,$rview);
if ($this->userDetails->JUser->get ('id')) {
echo $this->loadTemplate ('addshipto');
?>

<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="view" value="user"/>
<input type="hidden" name="controller" value="user"/>
<input type="hidden" name="task" value="saveUser"/>
<input type="hidden" name="layout" value="<?php echo $this->getLayout (); ?>"/>
<input type="hidden" name="address_type" value="<?php echo $this->address_type?>"/>
<?php if (!empty($this->virtuemart_userinfo_id)) {
echo '<input type="hidden" name="shipto_virtuemart_userinfo_id" value="' . (int)$this->virtuemart_userinfo_id '" />';
}
echo JHtml::('form.token');
?>


</fieldset>
</form>

GJC Web Design

comment out line 111

<?php // renderControlButtons($this,$rview); ?>
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation