Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301534

Not work correctly ROOMS_INCREASE

$
0
0

Hello, I have created a module to increase the price per day not proportional, for example 1 day 10€ 2 days 15€ 3 days 18€
the module is similar that rooms_pricing per cosecutive days
it's works correctly

The problem is that I use the complents with porcentage. In my case a ski rental:

1 day without boots 27,50€ with boots +20%
2 days without boots 50,50€; with boots +20%=60.60€
...

The problem is, it only calculate correctly the first day.

I think that the problem is that in the file

sites\all\modules\rooms\modules\rooms_pricing\includes

the $base_price is not correct, if modify the $bise_price for 60.60 manualy, it works correctly

case ROOMS_INCREASE:

$price += $base_price * ($modifier['#amount'] * $modifier['#quantity']) / 100 ;
$reply['log']['modifiers'][$source][ROOMS_DYNAMIC_MODIFIER]['op'] = ROOMS_INCREASE;
$reply['log']['modifiers'][$source][ROOMS_DYNAMIC_MODIFIER]['post'] = $price;

break;

Do you have some idea
thanks


Viewing all articles
Browse latest Browse all 301534

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>