[Skip to main content](#vessel-content)

#   Charging per fixed amount of days for events.

##

- **[troylight](/forum/user/12669-troylight "View troylight's Profile")**
- [![troylight's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12669-troylight "View troylight's Profile") Topic Author
- [ Offline](/forum/user/12669-troylight)

Less More

- Posts: 4
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#85106](#85106) by [troylight](/forum/user/12669-troylight "View troylight's Profile")  *[Charging per fixed amount of days for events.](/forum/4-how-to/77377-charging-per-fixed-amount-of-days-for-events#85106 "Hi I have a question on the best way to charge for for renting Items. The site is only renting items for spescific events that have a set amount of days. So some events we need to charge for 2 days...")* was created by *[troylight](/forum/user/12669-troylight "View troylight's Profile")*

Hi I have a question on the best way to charge for for renting Items. The site is only renting items for spescific events that have a set amount of days. So some events we need to charge for 2 days (product price x 2) some events we need to charge 3days (product price x 3) or if its a one day event we just charge the base price (1 day).

I would think we could use Characteristics (1 day price $10.00, 2 day price $20.00, 3 day price $30.00) but we don't want the client to be able to select the amount of days as they are fixed for the event, or can we force a category to not show the other characteristics or is there a way to for items in a category to multiply based on what category they are in. Or maybe I'm not aware of another option such as a plugin based on a category to do what we are needing.

**Our current way our store is set up.**
All events have there own category.
We have a category for packages and the items here have "options" , the options products have Characteristics for amounts the users wants to select.
Next we have Item rentals that are single Items fro rent but we have options set on them so they can select thing they need with that item.

Thanks in advance for any advice on the best way to do this.

Last edit: 13 years 9 months ago by [troylight](/forum/user/12669-troylight "View troylight's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3Mzc3LWNoYXJnaW5nLXBlci1maXhlZC1hbW91bnQtb2YtZGF5cy1mb3ItZXZlbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[troylight](/forum/user/12669-troylight "View troylight's Profile")**
- [![troylight's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12669-troylight "View troylight's Profile") Topic Author
- [ Offline](/forum/user/12669-troylight)

Less More

- Posts: 4
- Thank you received: 0
-
-

13 years 9 months ago [\#85137](#85137) by [troylight](/forum/user/12669-troylight "View troylight's Profile")  Replied by *[troylight](/forum/user/12669-troylight "View troylight's Profile")* on topic *[Charging per fixed amount of days for events.](/forum/4-how-to/77377-charging-per-fixed-amount-of-days-for-events#85137 "Hi I have a question on the best way to charge for for renting Items. The site is only renting items for spescific events that have a set amount of days. So some events we need to charge for 2 days...")*

So I found the way to do this is make a joomla plugin that i based off your your "Custom Quantity Weight plugin".

So i made 3 Custom fields using "Table-Items" and a "Field type -Radio Button", one for each day, (1 day rental with value of 1) (2 day rental with value of 2) (3 day rental with value of 3). Then I can assign the one i need to a category-(event) depending on how many days we are billing for that event.

Ok that part is fine and working well if we add it to the cart it changes price based on Value number set in the Custom field i made. Now I have 2 more questions.

1- I need to locate the best way to change the wording-text in 2 places. The product price "each" i need to "Each Day" or "Per Day" but only on some categories and i need to make other categories to say some other wording Like "Per Hour".

2- The "Price with options" I also need to say "Price with options per day" but again only on some categories.

My other thought is to make the price change based on my rental days value. How can that be done? is the an override for that?

Thanks in advance for any help here!!

- [ ![Screen&#95;Shot&#95;2013-01-12&#95;at&#95;4&#95;03&#95;37&#95;AM&#95;copy.png](/forum/attachment/7930) ](/forum/attachment/7930 "...37&#95;AM&#95;copy.png") [ ](/forum/attachment/7930?download=1 "...37&#95;AM&#95;copy.png")
- [ ![Screen&#95;Shot&#95;2013-01-12&#95;at&#95;4&#95;02&#95;20&#95;AM.png](/forum/attachment/7931) ](/forum/attachment/7931 "...4&#95;02&#95;20&#95;AM.png") [ ](/forum/attachment/7931?download=1 "...4&#95;02&#95;20&#95;AM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3Mzc3LWNoYXJnaW5nLXBlci1maXhlZC1hbW91bnQtb2YtZGF5cy1mb3ItZXZlbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[troylight](/forum/user/12669-troylight "View troylight's Profile")**
- [![troylight's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12669-troylight "View troylight's Profile") Topic Author
- [ Offline](/forum/user/12669-troylight)

Less More

- Posts: 4
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#85138](#85138) by [troylight](/forum/user/12669-troylight "View troylight's Profile")  Replied by *[troylight](/forum/user/12669-troylight "View troylight's Profile")* on topic *[Charging per fixed amount of days for events.](/forum/4-how-to/77377-charging-per-fixed-amount-of-days-for-events#85138 "Hi I have a question on the best way to charge for for renting Items. The site is only renting items for spescific events that have a set amount of days. So some events we need to charge for 2 days...")*

Well i fond that the plugin only add my "rental days" to the product and not the options on the product. How can i get the plugin to add to the product option? I do have the Custom field set to the category i have all of the items in.
Code:

&lt;?php jimport('joomla.plugin.plugin'); class plgSystemCustom_quantity_days extends JPlugin{ } function hikashop_product_price_for_quantity_in_cart(&amp;$product){ $currencyClass = hikashop::get('class.currency'); $quantity = @$product-&gt;cart_product_quantity; if(!empty($product-&gt;ordered_days)){ $quantity = $quantity*$product-&gt;ordered_days; } $currencyClass-&gt;quantityPrices($product-&gt;prices,$quantity,$product-&gt;cart_product_total_quantity); } function hikashop_product_price_for_quantity_in_order(&amp;$product){ $quantity = $product-&gt;order_product_quantity; if(!empty($product-&gt;ordered_days)){ $quantity = $quantity*$product-&gt;ordered_days; } $product-&gt;order_product_total_price_no_vat = $product-&gt;order_product_price*$quantity; $product-&gt;order_product_total_price = ($product-&gt;order_product_price+$product-&gt;order_product_tax)*$quantity; }

I also tried Group options with product and both do the same.

- [ ![opt-not-showing.png](/forum/attachment/7932) ](/forum/attachment/7932 "...ot-showing.png") [ ](/forum/attachment/7932?download=1 "...ot-showing.png")
- [ ![Screen&#95;Shot&#95;2013-01-12&#95;at&#95;11&#95;34&#95;13&#95;AM.png](/forum/attachment/7933) ](/forum/attachment/7933 "...1&#95;34&#95;13&#95;AM.png") [ ](/forum/attachment/7933?download=1 "...1&#95;34&#95;13&#95;AM.png")

Last edit: 13 years 9 months ago by [troylight](/forum/user/12669-troylight "View troylight's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3Mzc3LWNoYXJnaW5nLXBlci1maXhlZC1hbW91bnQtb2YtZGF5cy1mb3ItZXZlbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

13 years 9 months ago [\#85252](#85252) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Charging per fixed amount of days for events.](/forum/4-how-to/77377-charging-per-fixed-amount-of-days-for-events#85252 "Hi I have a question on the best way to charge for for renting Items. The site is only renting items for spescific events that have a set amount of days. So some events we need to charge for 2 days...")*

Hi,

The system call the trigger for both the options and the main products.
However, only the main product has the custom field values.
So you need to have something in place in your code to store the custom field value of the main product in order to use it for the option.

For example:
static $main_product_field_value = array();
if(empty($product-&gt;ordered_days)){
$product-&gt;ordered_days = $main_product_field_value[$product-&gt;cart_product_option_parent_id];
}else{
$main_product_field_value[$product-&gt;cart_product_id] = $product-&gt;ordered_days;
}

The following user(s) said Thank You: [troylight](/forum/user/12669-troylight "View troylight's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3Mzc3LWNoYXJnaW5nLXBlci1maXhlZC1hbW91bnQtb2YtZGF5cy1mb3ItZXZlbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.092 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
