Jump to content

Unit Price is always 0 if there is combination price available_date_attribute


Bao NGUYEN

Recommended Posts

It can't update the unit_ratio and unit price of a product on the back office,

image.png.d87eb9f90e8a43a2ad4f8f4405addd89.png

It works if there is not date available  in combination, if there is date , the unit price has been reset to 0.

image.png.53a49a3c677f88ce023196175dbf80bd.png

I debug and i found out why it's becaus of this code in the product class. it will update the product with combinntion information. For me it doesn't make sense

 public function setAvailableDate($available_date = '0000-00-00')
    {
        if (Validate::isDateFormat($available_date) && $this->available_date != $available_date) {
            $this->available_date = $available_date;

            return $this->update();
        }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...