Accepting Deposits in Hika

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
8 years 9 months ago #227967

All the deposit plugin does is that it changes the price of the product in the cart in order to take into account the deposit custom field.
If you want to change the display of the unit price like in your screenshot, you indeed need to edit the cart.php file and add custom code to do the calculations and display yourself.
But in a previous message of yours, I see that you just added a unit price display, without doing any calculation. So it will just display the unit price again.
You need to add something like that before:

$this->row->prices[0]->unit_price->price_value = $this->row->prices[0]->unit_price->price_value*$this->row->deposit/100;
$this->row->prices[0]->unit_price->price_value_with_tax = $this->row->prices[0]->unit_price->price_value_with_tax*$this->row->deposit/100;

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 1
8 years 9 months ago #228130

I am trying to follow in his footsteps, still works but now displays an error.

So just missing the original price and pending payment .

capture

the second product in the cart. It does not work directly.
capture

<?php
                            $this->row->prices[0]->unit_price->price_value = $this->row->prices[0]->unit_price->price_value*$this->row->deposit/100;
                            $this->row->prices[0]->unit_price->price_value_with_tax = $this->row->prices[0]->unit_price->price_value_with_tax*$this->row->deposit/100; 
                               
                                ?>
                                
                                <?php
	if($this->element->deposit)
 	echo ''.number_format((float)$this->row->deposit, 0, '.', '').'%';
 
									$this->row =& $row;
									$this->unit = true;
									echo $this->loadTemplate();
								?>

Please just this point that I have left to finish my project.
Sure it is easy to implement the warehouse.

I am a beginner in php could you expand on the explanation.
I would be very grateful and would give me a lot of confidence hikashop to continue implementing it in my projects

Last edit: 8 years 9 months ago by liontv.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 8 months ago #233376

Hello,

We are sorry but we can't provide that kind of code customization through our support, so if you need the help of a professional developer you can check our partners section : www.hikashop.com/home/our-partners.html
Or our commercial jobs section : www.hikashop.com/forum/9-commercial-jobs.html

Please Log in or Create an account to join the conversation.

  • Posts: 84
  • Thank you received: 3
  • Hikashop Business
7 years 11 months ago #256291

Hi, I am really enthousiastic about hikashop. And working hard to try and fit it on our business.

We sell outdoor-courses. And I am trying to figure out the payments.

On paper our customers have the choice to either pay the whole amount at once, or 10% right away and the rest a couple of weeks prior to the course.
I have installed the deposits plugin and that works. But that means that for the specific course always the deposits must be payed.

I want the customer to have the same choice we used on paper. Can this easily be done? If so, what is the way to go?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
7 years 11 months ago #256305

Hi,

What you could do is to have a second payment method for the deposit and then add such code at the beginning of the deposit plugin:

<?php
$app = JFactory::getApplication();
if($app->getUserState('com_hikashop.payment_id') != XXX)
return; ?>
where XXX is the id of the payment method for the deposit.
That way, the deposit plugin will only apply it's deposit amount when that payment method with the id XXX is selected.

Last edit: 7 years 11 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
  • Hikashop Essential
7 years 5 months ago #271884

Hi, I am also trying to create a deposit function and I have been following the post above. I've downloaded the deposit plugin and assume I install it through the Joomla Extensions/Manage/Install function??
When I do this, I get an error saying....

Warning
JInstaller: :Install: Can't find Joomla XML setup file.
Error
Unable to find install package

Are plugins installed via Hikashop perhaps? I can't see where even when I go into System/Plugins/New.

Can you help please?
Thanks, JR

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
  • Hikashop Essential
7 years 5 months ago #271889

Hi, I found an updated deposit plugin which installed without a problem
Thanks, JR

Please Log in or Create an account to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum