#Stripe Configuration
1 messages · Page 1 of 1 (latest)
Ohh, succesfuly done, nothing
but, i have a new problem, 1 package work nice, but the more package no, have a 500 Server Error
Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99
Yeah, 1 sec
I'll send you one change that will need to be made to the code to fix this error.
Wait a bit. I'm trying to find a change that needs to be made
Okey
Thx
Do I understand correctly, the price of the product is more than 999?
And thats problem?
If so, then my fix should fix your problem
It exceeds 999 because 10,000 HUF is about 25 euros
- Go to <ctrlpanel_root>/app/Models/ShopProduct.php
- Find
public function getPriceAfterDiscount()
{
return number_format($this->price - ($this->price * PartnerDiscount::getDiscount() / 100), 2);
}```
and replace it with
```php
public function getPriceAfterDiscount()
{
$discountRate = PartnerDiscount::getDiscount() / 100;
$discountedPrice = $this->price * (1 - $discountRate);
return round($discountedPrice, 2);
}```
3. Find
```php
public function getTaxValue()
{
return number_format($this->getPriceAfterDiscount() * $this->getTaxPercent() / 100, 2);
}```
and replace with
```php
public function getTaxValue()
{
$taxValue = $this->getPriceAfterDiscount() * $this->getTaxPercent() / 100;
return round($taxValue, 2);
}```
4. Find
```php
public function getTotalPrice()
{
return number_format($this->getPriceAfterDiscount() + $this->getTaxValue(), 2);
}```
and replace with
```php
public function getTotalPrice()
{
$total = $this->getPriceAfterDiscount() + $this->getTaxValue();
return round($total, 2);
}```
5. Save filу and test
OK, let me know if it helps or not
Okey
Hmm, okey
This change will already be in 0.10, but for now it has to be added manually :(
👍