B
B
bone_games2019-07-05 13:55:37
opencart
bone_games, 2019-07-05 13:55:37

How to update additional value in cart?

Hello, there was a need to transfer an additional value to the basket. No problem adding
$this->request->post['price_custom']

$this->cart->add($this->request->post['product_id'], $quantity, $this->request->post['price_custom'], $option, $recurring_id);

Everything is perfectly transmitted and displayed.
Here at updating there was a question how to thrust this field here.
if (!empty($this->request->post['quantity'])) {
            foreach ($this->request->post['quantity'] as $key => $value) {
                $this->cart->update($key, $value);
            }

I hope I explained ... Thanks in advance for the answers

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question