Product editing variant cost

0

Hi, i found an issue while editing a product, while editing there is no field to update cost of the product variant, but the code for editing a product expects a value for cost, since there's no field for product variant cost, everytime you update a product which the variant already has a cost, the cost will be set to 0.

here's the code where you get the cost for the variant:

foreach ($product_variants as $pv) {
       $update_variants[] = [
              'id'    => $this->input->post('variant_id_' . $pv->id),
               'name'  => $this->input->post('variant_name_' . $pv->id),
               'cost'  => $this->input->post('variant_cost_' . $pv->id),
               'price' => $this->input->post('variant_price_' . $pv->id),
        ];
 }

also, what's the purpose of that cost? i read in another question that in the profit you don't use that cost, instead you use the main product's cost

Question Resolved For: Stock Manager Advance with All Modules 0 Votes 5 Answers 504 Views
Asked by Ricardo Flotte 4 years ago

0

Answered by Mian Saleem 4 years ago

Hello,

Variants don't have any cost addition like price. I will check in future updates.

Thank you

0

Answered by Prom Vongchann 11 months ago

Mian Saleem did you add this feature? i think it is also important.

0

Answered by Mian Saleem 11 months ago

Prom Vongchann No, it will only be added in the next major update. I have just started working on the rewrite of SMA. Thank you

0

Answered by Prom Vongchann 11 months ago

Mian Saleem Oh, thank you still waiting

0

Answered by Mian Saleem 11 months ago

Prom Vongchann It will take very long as I am starting to setup project and finalising the tech stack. Thanks

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.