Author Topic: Possible bug: product cloning change from "No override" to "default"  (Read 660 times)

zanardi

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
When you clone a product, if the original product is set to "Product details page: No override" (database value: 0), the new product gets a "default" value instead of "0".

That's because of line 685 in models/product.php:

if (empty($child->layout)) {

empty(0) returns true ( http://php.net/manual/en/function.empty.php ).

So the "0" value gets lost in favour of the "default" value.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter