Fixing style errors.
This commit is contained in:
parent
6086ecef86
commit
7a3f6c362d
@ -517,15 +517,15 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1";
|
|||||||
$forced_refvar = trim($forced_refvar);
|
$forced_refvar = trim($forced_refvar);
|
||||||
|
|
||||||
if (!empty($forced_refvar) && $forced_refvar != $product->ref) {
|
if (!empty($forced_refvar) && $forced_refvar != $product->ref) {
|
||||||
$existingProduct = new Product($db);
|
$existingProduct = new Product($db);
|
||||||
$result = $existingProduct->fetch('', $forced_refvar);
|
$result = $existingProduct->fetch('', $forced_refvar);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$newproduct = $existingProduct;
|
$newproduct = $existingProduct;
|
||||||
} else {
|
} else {
|
||||||
$existingProduct = false;
|
$existingProduct = false;
|
||||||
$newproduct = clone $product;
|
$newproduct = clone $product;
|
||||||
$newproduct->ref = $forced_refvar;
|
$newproduct->ref = $forced_refvar;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$forced_refvar = false;
|
$forced_refvar = false;
|
||||||
$existingProduct = false;
|
$existingProduct = false;
|
||||||
@ -591,9 +591,9 @@ WHERE c.fk_product_parent = ".(int) $productid." AND p.tosell = 1";
|
|||||||
|
|
||||||
if ($forced_refvar === false) {
|
if ($forced_refvar === false) {
|
||||||
if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
|
if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
|
||||||
$newproduct->ref .= $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR . $prodattrval->ref;
|
$newproduct->ref .= $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR . $prodattrval->ref;
|
||||||
} else {
|
} else {
|
||||||
$newproduct->ref .= '_'.$prodattrval->ref;
|
$newproduct->ref .= '_'.$prodattrval->ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user