News:

Looking for documentation? Take a look on our wiki

Main Menu

Cart Page Fields & Modifications

Started by PRO, August 15, 2012, 15:10:06 PM

Previous topic - Next topic

J3DI13

#105
Hi Hutson

I have added the code so kindly supplied by you but i see it only works when not in the override, which is weird maybe i am not doing the override properly. I have placed in my HTML folder of my template keeping the same file structure as the component or must i just place it open in the HTML folder? Anyway for now its not really important as i need to get the rest sorted out. I have attached an image of what the cart now looks like 1 query would be the 'net-total' header title looks funky, could it be a language file that is causing that? (Fixed this with the language file by adding in a new line)

I see now that VAT column is not displaying any VAT in the cart, would that be a config in the backend?



Many Thanks


[attachment cleanup by admin]

AH

Yes you need to config the Show tax in cart in order to get tax to show and I think you also need to config the display of prices to show tax

<?php if (VmConfig::get ('show_tax')) { ?>

<?php if (VmConfig::get ('show_tax')) { ?>
<td align="right"><?php echo "<span class='priceColor2'>" $this->currencyDisplay->createPriceDiv ('taxAmount'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE$prow->quantity) . "</span>" ?></td>
<?php ?>
<td align="right"><?php echo "<span class='priceColor2'>" $this->currencyDisplay->createPriceDiv ('discountedPriceWithoutTax'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE$prow->quantity) . "</span>" ?></td>
<td colspan="1" align="right">
<?php
// Quorvia no need for this rubbish!
//if (VmConfig::get ('checkout_show_origprice', 1) && !empty($this->cart->pricesUnformatted[$pkey]['basePriceWithTax']) && $this->cart->pricesUnformatted[$pkey]['basePriceWithTax'] != $this->cart->pricesUnformatted[$pkey]['salesPrice']) {
// echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceWithTax', '', $this->cart->pricesUnformatted[$pkey], TRUE, FALSE, $prow->quantity) . '</span><br />';
//}
//elseif (VmConfig::get ('checkout_show_origprice', 1) && empty($this->cart->pricesUnformatted[$pkey]['basePriceWithTax']) && $this->cart->pricesUnformatted[$pkey]['basePriceVariant'] != $this->cart->pricesUnformatted[$pkey]['salesPrice']) {
// echo '<span class="line-through">' . $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $this->cart->pricesUnformatted[$pkey], TRUE, FALSE, $prow->quantity) . '</span><br />';
//}
echo $this->currencyDisplay->createPriceDiv ('salesPrice'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE$prow->quantity?>
</td>



You are not placing the override in the right place if it only functions if you hack the default views
They should be placed in:-

\templates\your template\html\com_virtuemart\cart\
Regards
A

Joomla 4.4.5
php 8.1

J3DI13

Hi

I have 'Show Tax in Cart' selected in the backend and have added the code to config the display <?php if (VmConfig::get ('show_tax')) { ?> so this is what the VAT column code looks like....
<?php if (VmConfig::get ('show_tax')) { ?>
<th align="center"><?php echo "<span  class='priceColor2'>" JText::('COM_VIRTUEMART_CART_SUBTOTAL_NET_AMOUNT') . '</span>' ?></th>
<?php ?>


thanks

J3DI13

Ok so i have managed to get all the columns outputting a display, i am a bit worried that its not outputting the correct data tho. please see code for the VAT column below and jpeg attached.

<?php if (VmConfig::get ('show_tax')) { ?>
<th align="center"><?php echo "<span  class='priceColor2'>" JText::('COM_VIRTUEMART_CART_SUBTOTAL_NET_AMOUNT') . '</span>' ?></th>
<?php ?>


and the bottom  Vat row
<?php if (VmConfig::get ('show_tax')) { ?>
<td align="right"><?php echo "<span class='priceColor2'>" $this->currencyDisplay->createPriceDiv ('taxAmount'''$this->cart->pricesUnformatted[$pkey], FALSEFALSE$prow->quantity) . "</span>" ?></td>
    <?php ?>


[attachment cleanup by admin]

nmihos

Hello,

I want to add a form to my cart, where a seller can fill some chaeckboxes for the customer and some notes. But i want this form to be shown only for admins and not for the other users (or to be accesible by shopper group). A good idea is to edit the shipment form, but how can i make this form to be viewable only by the sellers?

nmihos

I set my sellers into the Shopper Group Sellers. I made a payment method which i call Sales Method and it is available and default only for the Selleres. Now i want the Shipment Form to appear when this payment method is selected.

martian474

Hi Admin,

Please help me. I want to add option(radio button/ dropdown) on my cart page that will add additional value to the total price.
for example:

1. Free pick-up (No additional charge)
2. Two days delivery( Additional charge).


Thank you very much!

GJC Web Design

This is your 3rd identical post for this question in 3 different topics - if you want to annoy the contributors your going the right way about it....
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

martian474

Hi,

I want the registered shopper can see the details and checkout only while the others will only see joomla login. Please help. Thanks




[attachment cleanup by admin]

AH

martian

Create yourself an overrride to
components/com_virtuemart/views/cart/tmpl/default.php

Replace


<?php echo shopFunctionsF::getLoginForm ($this->cartFALSE);





With




<?php echo shopFunctionsF::getLoginForm ($this->cartFALSE);
// check to see if the user is logged in
    
if(empty($this->cart->user->_id)){
        
// Close the <div class="cart-view">
        
echo "</div>";
        return;  
//skip the rest of this template


    
}
Regards
A

Joomla 4.4.5
php 8.1

KWinston

What an excellent thread!  I am trying to modify the Checkout Button in VM2.6.10/ Joomla 2.5.9.  I was directed to look for style.css. ut am having a tough time finding it. The modification my client wants is to remove it altogether and replace it with a button that links directly to BluePay. 

Thoughts?

Your insight is very much appreciated.  Thanks!

Alice67

?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?> This shows when the payment has NOT been selected<?php }?>
_Alice_

bob@robertclinton.com

Is there some code that will allow the shopper to toggle shipping addresses if they have more than one entered?

AH

that is already part of base functionality

what version are you using
Regards
A

Joomla 4.4.5
php 8.1