Please Help - Trying to create a 1-time fee based upon a category

Started by rustle, March 01, 2012, 17:44:19 PM

Previous topic - Next topic

rustle

Hi Guys,

I really need halp with this issue,

I aloso posted a similar topic in the Production Creation thread a couple of days ago, with no takers.

All I am trying to do is create a mandatory, 1-time fee, based on all products in a category (this fee should not be multiplied by the product quantity!)
I have attached an image with my configuration

Joomla 1.7.3
virtuemart 2.0.2

This seem like it ought to be an easy process to complete, and in factc i the only thing holding me back from going live with the site

please help


[attachment cleanup by admin]

PRO


rustle

Hi Banquet

Thank you for your assistance once again

Yes I have tried "tax per bill"
This was my immediate idea in fact

but VM then automatically assigns the tax to the cart, even if no purchase is made.

I believe that this is due to the fact that the "tax" functionality is looking for a region  :o

I just want to assign it to a category only


any ideas would be appreciated

VM 2.02

J 1.73

PRO

Quote from: rustle on March 01, 2012, 21:38:10 PM
but VM then automatically assigns the tax to the cart, even if no purchase is made.

U can hide it in the cart.
http://forum.virtuemart.net/index.php?topic=92144.msg318217#msg318217

and assign the tax per bill to the category.

rustle

HI Banquet

thank you for this post,

I have read it numerous times. but your template override solution does not specify the file to edit
Is this still effective in 2.0.2

can you point me in the right direction

also I have a global setup fee levied.
Will this effect this tax as well?
or just the one that is assigned to the category

thank you in advance.

PRO


rustle

Hi Banquet

I am little confused as to how you got your fix to work

Just to be clear I am trying to put your:

"<?php if (!empty($this->cart->BT)){
foreach($this->cart->cartData['DATaxRulesBill'] as $rule){ ?>
         <tr class="sectiontableentry<?php $i ?>">
            <td colspan="4" align="right"><?php echo   $rule['calc_name'] ?> </td>

                                     <?php if ( VmConfig::get('show_tax')) { ?>
            <td align="right"><?php  ?> </td>
                                <?php } ?>
            <td align="right"><?php echo  $this->cart->prices[$rule['virtuemart_calc_id'].'Diff'];   ?> </td>
            <td align="right"><?php echo $this->cart->prices[$rule['virtuemart_calc_id'].'Diff'];   ?> </td>
         </tr>
         <?php
         if($i) $i=1; else $i=0;
      } }?>"

fix in the com_virtuemart/views/cart/tmpl/default_pricelist.php file

I seems to me that the most logical place to put this override is around line 264... Is this not correct?

However the tax is still visible in the cart

What am I doing wrong

Would it possible to let me know what lines of code you altered in order to get over this hurdle


Thank you in advance
Also a couple of people have PM'ed about this hoping to find a solution as well. (so I know that I am not the only one facing this challenge.)

PRO

Thats the tax per bill.

There are also tax per product and other , calculation in the cart.

You can wrap whatever you dont want to showup in that code.

rustle

Hi Banquet

The calculation is set to  'tax per bill'

it is set to 'not visible for shopper'

I have tried with both region set on and off but still it appears in the cart

what am I doing wrong

I have a feeling it is to do with where I placed the php script you posted

what line or general location did you place your code?

thank you in advance.

rustle

PLease can you assist further Banquet

this is all that is keeping us from going live with the site

PRO

THIS code will make ANYTHING you want NOT show up, until a billing address is filled in.

<?php if (!empty($this->cart->BT)){ ?>
HIDDEN
<?php }?>

SO,.

<?php

      foreach($this->cart->cartData['taxRulesBill'] as $rule){ ?>
         <?php if (!empty($this->cart->BT)){ ?><tr class="sectiontableentry<?php $i ?>">
            <td colspan="4" align="right"><?php echo $rule['calc_name'] ?> </td>
            <?php if ( VmConfig::get('show_tax')) { ?>
            <td align="right"><?php echo $this->cart->prices[$rule['virtuemart_calc_id'].'Diff']; ?> </td>
             <?php } ?>
            <td align="right"><?php    ?> </td>
            <td align="right"><?php echo $this->cart->prices[$rule['virtuemart_calc_id'].'Diff'];   ?> </td>
         </tr><?php } ?>


BOLD text is what I added.
YOU do the same with whatever you dont want to show up.

rustle

Hi Banquet

Thank you for the explanation that was much more clear  :D

I have now got the 'Tax per bill' to only display when the user has entered their billing information
this is a good fix which hopefully will be applied in a future upgrade.

However this did not solve the original intent of this post, which is to levy a a 'tax per bill' based upon a category ONLY

the tax still appears globally when ANY product is selected  :(

What I am trying to do is have a categories like - $50 set up fee / $25 dollar setup fee (which have been created & are published)
any products that belong to these categories would have the associated 'tax per bill' applied one time to the final bill

you can see my settings below
what ends up happening is that ANY product which gets selected has the 'tax per bill' applied

how do I resolve this?

[attachment cleanup by admin]

PRO

have you tried to go into the actual products and apply the rules to the products?


rustle

Yes-  if you do this,
then the tax gets multiplied by the quantity of the product - even if the tax rule is a 'tax per bill'

PRO

I have tried it many ways and cannot get it to work the way you want.

Why not have the setup fee as a product?