News:

Support the VirtueMart project and become a member

Main Menu

How to add two more rows in the cart module?

Started by ex3mist, June 27, 2015, 08:20:27 AM

Previous topic - Next topic

ex3mist

Hello,
In the mod_virtuemart_cart some info is missing and I'd like to correct it. My question is:
If this is the code that shows the total sum (products total + shipping):
<?php if ($data->totalProduct) echo  $data->billTotal?>

how can I insert the both separately - only total products sum and only shipping?

ex3mist

Hello,
As I see there is no answer, I'll try to explain more detailed what I'd like to achieve:

I think that the information displayed by the VM Cart module is kind of inaccurate and misleading, so I've attached two images. I'd like to ask if one of those things that is shown on them could be done? Either way it would work for me.

Image 1: To include two more rows of code that will display the total products price and the shipping price. Without it the information that is displayed by the module is insufficient and the customer can't understand why the prices don't match.

Image 2: Instead of including additional info, to edit the current info - the price that is shown in the cart page (green arrow) to be shown in the module (blue arrows). This way the shipping would not be included in the information displayed by the module, and it will be shown only in the cart page.

As I said, I don't care which one would be achieved, both would suit my needs. I just want the information to be clear.

The code in the module's default.php file that displays this is:

<div class="all">
         <div class="tot3">
               <?php if ($data->totalProduct) echo  $data->taxTotal?>
        </div>
        <div class="tot4">
              <?php if ($data->totalProduct) echo  $data->discTotal?>
        </div>
        <div class="total">
            <?php if ($data->totalProduct) echo  $data->billTotal?>
        </div>
        <div class="show_cart">
            <?php if ($data->totalProduct) echo  $data->cart_show?>
        </div>
        </div


Could two more rows be included in it so that case 1 to be achieved? Or how should this row be edited:

<?php if ($data->totalProduct) echo  $data->billTotal?>

so that case 2 be achieved?

Thank you!

P.S. If anyone would like to offer paid service to do this and customize the module, please, send me a private message.

AH

#2
That looks like a commercial template that has its' own cart module

Have you asked them if they can modify this for you, this might be your simplest route.

I did have a similar functional need "to only display product total excluding any shipping or payment costs in VM mini-cart" -

I had to make changes to the core files to make this data available in the minicart

- which means I have to reapply them whenever I upgrade

Something that not everyone would be comfortable doing.


Regards
A

Joomla 4.4.5
php 8.1

ex3mist

Quote from: Hutson on June 30, 2015, 10:43:33 AM
That looks like a commercial template that has its' own cart module

Have you asked them if they can modify this for you, this might be your simplest route.

I did have a similar functional need "to only display product total excluding any shipping or payment costs in VM mini-cart" -

I had to make changes to the core files to make this data available in the minicart

- which means I have to reapply them whenever I upgrade

Something that not everyone would be comfortable doing.

Hello,
I agree that sometimes it seems simple as a result, but it's difficult to achieve.
And yes, it is a commercial template and I asked the developer for this, but still have no answer. The reason I wrote here is that I compared this cart module with the module that is in the VM demo, and this information I'm talking about is missing too. So, whether or not the module is modified, the original VM module is also missing this. And I think this is important to show the correct prices to the customer and how they are formed.

That's why I asked for help here. And if anyone thinks he may help, he's welcome. Thanks!

ex3mist

Quote from: Hutson on June 30, 2015, 10:43:33 AM

I had to make changes to the core files to make this data available in the minicart


Hello Hutson,

A lot of time has passed and I'm back to this issue again. I don't have other resolution to it, so I'd like to ask you if you could share how you achieved it? Thanks!

GJC Web Design

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


GJC Web Design

It is not VM3 compat yet .. let me know if u want 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

Milbo

Quote from: Hutson on June 30, 2015, 10:43:33 AM
I did have a similar functional need "to only display product total excluding any shipping or payment costs in VM mini-cart" -

I had to make changes to the core files to make this data available in the minicart

- which means I have to reapply them whenever I upgrade

Something that not everyone would be comfortable doing.

uhmm, you may give me a patch?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

Regards
A

Joomla 4.4.5
php 8.1