Jump to content
TyrNjord

modul presta shop

Recommended Posts

Posted

dat fiind faptul ca nimeni nu a raspuns in sectiunea "cereri", sunt curios cine cat de mult ar cere pt asta

Salutare!

As vrea sa stiu daca se poate modifica un modul de prestashop (wishlist) a.i. sa-l transform intr-o cerere oferta pret...

Pe scurt, in loc sa adauge produsul in wishlist si cantitate "1", sa adauge produsul si in fata lui sau dupa lui sa fie camp editabil pt cantitate, de asemenea adaugat un buton pentru trimitere cerere cu functie de trimitere e-mail catre blabla@example.com.

Bun... Sper ca m-am exprimat corect pana aici. Acum, wishlist-ul asta are functie de trimitere email din alta pagina, dar trimite un link spre lista lu' x-ulescu.. As prefera sa-mi ajunga un tabel pe mail, tabel care sa contina poza produsului dorit, numele lui si cantitatea dorita, a.i. sa-i pot injgheba rapid o oferta de pret si sa-i raspun omului la mail.

Multumesc de pe acum pentru raspunsuri/dojeneli/caterinca :)!

O zi frumoasa sa aveti,

M.

L.E> Revin cu cod pentru pagina ce ma intereseaza. daca nu altceva, macar cand se apasa "trimite lista de dorinte" sa nu apara campuri e-mail ci sa trimita direct catre o adresa de mail.

require_once(dirname(__FILE__).'/../../config/config.inc.php');
require_once(dirname(__FILE__).'/../../init.php');
require_once(dirname(__FILE__).'/WishList.php');
require_once(dirname(__FILE__).'/blockwishlist.php');

$context = Context::getContext();

// Instance of module class for translations
$module = new BlockWishList();

if (Configuration::get('PS_TOKEN_ENABLE') == 1 AND
strcmp(Tools::getToken(false), Tools::getValue('token')) AND
$context->customer->isLogged() === true)
exit($module->l('invalid token', 'sendwishlist'));

if ($context->customer->isLogged())
{
$id_wishlist = (int)(Tools::getValue('id_wishlist'));
if (empty($id_wishlist) === true)
exit($module->l('Invalid wishlist', 'sendwishlist'));
for ($i = 1; empty($_POST['email'.strval($i)]) === false; ++$i)
{
$to = Tools::getValue('email'.$i);
$wishlist = WishList::exists($id_wishlist, $context->customer->id, true);
if ($wishlist === false)
exit($module->l('Invalid wishlist', 'sendwishlist'));
if (WishList::addEmail($id_wishlist, $to) === false)
exit($module->l('Wishlist send error', 'sendwishlist'));
$toName = strval(Configuration::get('PS_SHOP_NAME'));
$customer = $context->customer;
if (Validate::isLoadedObject($customer))
Mail::Send(
$context->language->id,
'wishlist',
sprintf(Mail::l('Message from %1$s %2$s', $context->language->id), $customer->lastname, $customer->firstname),
array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{wishlist}' => $wishlist['name'],
'{message}' => Tools::getProtocol().htmlentities($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/blockwishlist/view.php?token='.$wishlist['token']),
$to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, dirname(__FILE__).'/mails/');
}
}

Nu cred ca am cerut marea cu sarea si sunt dezamagit de faptul ca nu am primit nici macar un hint..

astept pareri :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...