Hi, in VM2 I was able to move the customer-comment field above the cart-table (to comply with local laws requiring the order button to be immediately below the cart-table).
In VM3 I am not finding that field anymore. It does show in the cart though, below the cart-table, so it must be defined somewhere. I am not using an override (yet). I searched for customer-comment and customer_comment in the complete com_virtuemart.
How do I get the field above the cart? (I am aware that I can depublish it via the VM backend altogether, but that is not the solution I am seeking.)
I searched here in the forum and elsewhere and did find references to default_pricelist.php, but the comment is just not there. This is what is used to be in VM2:
<?php // Leave A Comment Field ?>
<div class="customer-comment marginbottom15">
<span class="comment"><?php echo JText::_ ('COM_VIRTUEMART_COMMENT_CART'); ?></span><br/>
<textarea class="customer-comment" name="customer_comment" cols="60" rows="1"><?php echo $this->cart->customer_comment; ?></textarea>
</div>
<?php // Leave A Comment Field END ?>
Many thanks and regards,
Dan
J3.48
VM3.0.13
Hi, further to the above, I am unable to locate the Terms of Service field anymore. As this is located below the elements defined in the default_pricelist.php, I have thought to find this in the default.php. But there is nothing between the cart table and the checkout button:
<?php
// This displays the pricelist MUST be done with tables, because it is also used for the emails
echo $this->loadTemplate ('pricelist');
if (!empty($this->checkoutAdvertise)) {
?> <div id="checkout-advertise-box"> <?php
foreach ($this->checkoutAdvertise as $checkoutAdvertise) {
?>
<div class="checkout-advertise">
<?php echo $checkoutAdvertise; ?>
</div>
<?php
}
?></div><?php
}
echo $this->loadTemplate ('cartfields');
?> <div class="checkout-button-top"> <?php
echo $this->checkout_link_html;
?></div>
<?php // Continue and Checkout Button END ?>
<input type='hidden' name='order_language' value='<?php echo $this->order_language; ?>'/>
<input type='hidden' name='task' value='updatecart'/>
<input type='hidden' name='option' value='com_virtuemart'/>
<input type='hidden' name='view' value='cart'/>
</form>
<?php
Below that comes new code:
<?php
if(VmConfig::get('oncheckout_ajax',false)){
vmJsApi::addJScript('updDynamicListeners',"
if (typeof Virtuemart.containerSelector === 'undefined') Virtuemart.containerSelector = '#cart-view';
if (typeof Virtuemart.container === 'undefined') Virtuemart.container = jQuery(Virtuemart.containerSelector);
jQuery(document).ready(function() {
if (Virtuemart.container)
Virtuemart.updDynFormListeners();
}); ");
}
vmJsApi::addJScript('vm.checkoutFormSubmit',"
Virtuemart.bCheckoutButton = function(e) {
e.preventDefault();
jQuery(this).vm2front('startVmLoading');
jQuery(this).attr('disabled', 'true');
jQuery(this).removeClass( 'vm-button-correct' );
jQuery(this).addClass( 'vm-button' );
jQuery(this).fadeIn( 400 );
var name = jQuery(this).attr('name');
var div = '<input name=\"'+name+'\" value=\"1\" type=\"hidden\">';
jQuery('#checkoutForm').append(div);
//Virtuemart.updForm();
jQuery('#checkoutForm').submit();
}
jQuery(document).ready(function($) {
jQuery(this).vm2front('stopVmLoading');
var el = jQuery('#checkoutFormSubmit');
el.unbind('click dblclick');
el.on('click dblclick',Virtuemart.bCheckoutButton);
});
");
if( !VmConfig::get('oncheckout_ajax',false)) {
vmJsApi::addJScript('vm.STisBT',"
jQuery(document).ready(function($) {
if ( $('#STsameAsBTjs').is(':checked') ) {
$('#output-shipto-display').hide();
} else {
$('#output-shipto-display').show();
}
$('#STsameAsBTjs').click(function(event) {
if($(this).is(':checked')){
$('#STsameAsBT').val('1') ;
$('#output-shipto-display').hide();
} else {
$('#STsameAsBT').val('0') ;
$('#output-shipto-display').show();
}
var form = jQuery('#checkoutFormSubmit');
form.submit();
});
});
");
}
$this->addCheckRequiredJs();
echo vmJsApi::writeJS();
?>
Are the Terms of Service defined here, and if yes, how can I move that above the cart table? Please advise.
Thanks and regards,
Dan
was this ever answered? I am trying to find the Leave A Comment Field as well
from what I can tell,
cart\default_cartfields.php
is called via
echo $this->loadTemplate ('cartfields');
at around line 83 of cart\default.php.
in case that helps any...
1st place I looked - there is nothing there that I can tell which would determine how many rows high the customers comments area is.