How can I change the original price on OpenCart product page?

后端 未结 2 1985
星月不相逢
星月不相逢 2021-02-10 09:35

Without using the Admin panel. I want to be able to change the price of an item in OpenCart on the product page.

Basically I have an Option called Bespoke/Custom:<

2条回答
  •  我在风中等你
    2021-02-10 10:06

    -"This should only point You to the right direction (while believing the finish is not that far). via @shadyyx"

    Thank you @shadyyx - for showing the correct approach... I managed to get it working and this is how:

    if(isset($this->session->data['cart']['custom_price'][$key])) {
        $this->data[$key]['price'] = $this->session->data['cart']['custom_price'][$key];
    } 
    

    should be :

    if(isset($this->session->data['custom_price'][$key])) {
        $this->data[$key]['price'] = $this->session->data['custom_price'][$key];
    }
    

    Thank you again and I hope somebody find this useful.

提交回复
热议问题