Advertisement
Guest User

Untitled

a guest
Mar 24th, 2022
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. public static function save(string $name): string
  2.     {
  3.         $msg = '';
  4.         if ($_SESSION['Kunde']->kKunde > 0 && !empty($name)) {
  5.             $list            = new Wishlist();
  6.             $list->cName     = $name;
  7.             $list->nStandard = 0;
  8.             unset(
  9.                 $list->CWunschlistePos_arr,
  10.                 $list->oKunde,
  11.                 $list->kWunschliste,
  12.                 $list->dErstellt_DE
  13.             );
  14.         $urlID    = \uniqid('', true);
  15.         $campaign = new Campaign(\KAMPAGNE_INTERN_OEFFENTL_WUNSCHZETTEL);
  16.         if ($campaign->kKampagne > 0) {
  17.             $urlID .= '&' . $campaign->cParameter . '=' . $campaign->cWert;
  18.         }
  19.             $list->nOeffentlich = 1;
  20.             $list->cURLID       = $urlID;
  21.  
  22.             Shop::Container()->getDB()->insert('twunschliste', $list);
  23.  
  24.             $msg = Shop::Lang()->get('wishlistAdd', 'messages');
  25.         }
  26.  
  27.         return $msg;
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement