I was wondering what I would need to edit to add a - negative sign in front?
I've look through OC "Cash On Delivery" extension and "Payment Discount Lite" extension and can't seem to figure out where to add the - negative sign

~ OC 3.0.3.2 and OCmods only ~
Code: Select all
<?php
/**
*
*/
class ModelExtensionTotalPaymentDiscount extends Controller
{
public function getTotal($total)
{
if ($this->config->get('total_payment_discount_status') && isset($this->session->data['payment_method']['code']) && $this->cart->getSubTotal()) {
$discount_payment_method = $this->config->get('total_payment_discount_payment_type');
if ($discount_payment_method == $this->session->data['payment_method']['code']) {
$desc_text = $this->config->get('total_payment_discount_description');
$discount = $this->config->get('total_payment_discount_percentage');
$sort_order = $this->config->get('total_payment_discount_sort_order');
$total['totals'][] = array(
'code' => 'payment_discount',
'title' => $desc_text,
'value' => (($discount / 100) * $total['total']),
'sort_order' => $sort_order,
);
$total['total'] -= (($discount / 100) * $total['total']);
}
}
}
}
~ OC 3.0.3.2 and OCmods only ~
Code: Select all
'value' => (($discount / 100) * $total['total']),
Code: Select all
'value' => -(($discount / 100) * $total['total']),
That actually worked ツ, thank a bunch. I was actually afraid to mess with it since I don't know much about PHP and didn't want to mess up my checkout.ADD Creative wrote: ↑Sat Mar 23, 2024 5:42 pmTry changing.To.Code: Select all
'value' => (($discount / 100) * $total['total']),
Code: Select all
'value' => -(($discount / 100) * $total['total']),
~ OC 3.0.3.2 and OCmods only ~
Great, so please add [SOLVED] to the start of this topic title.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Users browsing this forum: No registered users and 20 guests