VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: ex3mist on June 27, 2015, 08:20:27 AM

Title: How to add two more rows in the cart module?
Post by: ex3mist on June 27, 2015, 08:20:27 AM
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?
Title: Re: How to add two more rows in the cart module?
Post by: ex3mist on June 30, 2015, 09:42:17 AM
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.
Title: Re: How to add two more rows in the cart module?
Post by: AH 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.


Title: Re: How to add two more rows in the cart module?
Post by: ex3mist on July 02, 2015, 16:30:48 PM
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!
Title: Re: How to add two more rows in the cart module?
Post by: ex3mist on September 08, 2015, 12:03:18 PM
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!
Title: Re: How to add two more rows in the cart module?
Post by: GJC Web Design on September 08, 2015, 16:26:00 PM
http://www.gjcwebdesign.com/virtuemart-20-cart-with-shipping-module.html  ?

Could upgrade to VM3 if you wanted it



Title: Re: How to add two more rows in the cart module?
Post by: ex3mist on September 09, 2015, 08:45:35 AM
Looks great, thanks!
Title: Re: How to add two more rows in the cart module?
Post by: GJC Web Design on September 09, 2015, 09:43:27 AM
It is not VM3 compat yet .. let me know if u want it..
Title: Re: How to add two more rows in the cart module?
Post by: Milbo on September 15, 2015, 20:49:42 PM
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?
Title: Re: How to add two more rows in the cart module?
Post by: AH on September 15, 2015, 22:46:45 PM
ahh - I dont know how to do a patch  :-[