/** * Crée un vote pour un produit * * @param integer $vote_product_id L'identifiant du produit * @param integer $vote_uid L'identifiant de l'utilisateur * @param integer $vote_rating Le vote * @return le résultat de la création du vote */ function createRating($vote_product_id, $vote_uid, $vote_rating) { $product = $this->create(true); $product->setVar('vote_product_id', $vote_product_id); $product->setVar('vote_uid', $vote_uid); $product->setVar('vote_rating', $vote_rating); $product->setVar('vote_ratinghostname', myshop_utils::IP()); $product->setVar('vote_ratingtimestamp', time()); return $this->insert($product); }
$msgCommande .= implode("\n", $discountsDescription); $msgCommande .= "\n"; } $msg = array(); $msg['COMMANDE'] = $msgCommande; $msg['NUM_COMMANDE'] = $commande->getVar('cmd_id'); $msg['NOM'] = $commande->getVar('cmd_lastname'); $msg['PRENOM'] = $commande->getVar('cmd_firstname'); $msg['ADRESSE'] = $commande->getVar('cmd_adress'); $msg['CP'] = $commande->getVar('cmd_zip'); $msg['VILLE'] = $commande->getVar('cmd_town'); $msg['PAYS'] = $countries[$commande->getVar('cmd_country')]; $msg['TELEPHONE'] = $commande->getVar('cmd_telephone'); $msg['EMAIL'] = $commande->getVar('cmd_email'); $msg['URL_BILL'] = MYSHOP_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass='******'IP'] = myshop_utils::IP(); if ($commande->getVar('cmd_bill') == 1) { $msg['FACTURE'] = _YES; } else { $msg['FACTURE'] = _NO; } // Send mail to user myshop_utils::sendEmailFromTpl('command_client.tpl', $commande->getVar('cmd_email'), sprintf(_MYSHOP_THANKYOU_CMD, $xoopsConfig['sitename']), $msg); // Send mail to group admin myshop_utils::sendEmailFromTpl('command_shop.tpl', myshop_utils::getEmailsFromGroup(myshop_utils::getModuleOption('grp_sold')), _MYSHOP_NEW_COMMAND, $msg); // Display form to send to Paypal // Display final caddy with hidden values if (myshop_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0 || xoops_trim(myshop_utils::getModuleOption('paypal_email')) == '') { $payURL = XOOPS_URL; $registry = new myshop_registryfile(); $text = $registry->getfile(MYSHOP_TEXTFILE4);