20-02-2026

This commit is contained in:
Kevin Adametz 2026-02-20 17:55:06 +01:00
parent a8b395e20d
commit a00c42e770
252 changed files with 28785 additions and 8907 deletions

View file

@ -27,6 +27,8 @@ class ProductRepository extends BaseRepository
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
$data['no_commission'] = isset($data['no_commission']) ? 1 : 0;
$data['no_free_shipping'] = isset($data['no_free_shipping']) ? 1 : 0;
$data['free_shipping_consultant'] = isset($data['free_shipping_consultant']) ? 1 : 0;
$data['is_membership_only'] = isset($data['is_membership_only']) ? 1 : 0;
$data['buying_restriction'] = isset($data['buying_restriction']) ? 1 : 0;
$data['sponsor_buying_points'] = isset($data['sponsor_buying_points']) ? 1 : 0;
$data['show_on'] = isset($data['show_on']) ? $data['show_on'] : null;
@ -217,7 +219,7 @@ class ProductRepository extends BaseRepository
public function copy($model)
{
$this->model = $model->replicate();
$this->model->name = 'Kopie: ' . $this->model->name;
$this->model->name = 'Kopie: '.$this->model->name;
$this->model->wp_number = null;
$this->model->save();
@ -240,12 +242,12 @@ class ProductRepository extends BaseRepository
// images
foreach ($model->images as $image) {
$name = \App\Services\Slim::sanitizeFileName($image->original_name);
$name = uniqid() . '_' . $name;
$name = uniqid().'_'.$name;
// copy
$data = \Storage::disk('public')->copy(
'images/product/' . $image->product_id . '/' . $image->filename,
'images/product/' . $this->model->id . '/' . $name
'images/product/'.$image->product_id.'/'.$image->filename,
'images/product/'.$this->model->id.'/'.$name
);
ProductImage::create([