L'url dovrebbe essere questo se non sbaglio..
index.php?route=module/newslettersubscribe/subscribe
Qualcuno sa aiutarmi? ^^
Grazie
Eco-friendly Clothing Store for Man and Woman, with a wide selection of Vegan and Made in Italy clothing, bags, underwear. http://www.vestilanatura.it for join the sustainable lifestyle!
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
raikage wrote:fammi capire bene,vorresti inserire un bottone con link a quell'url,così che i clienti cliccando sul pulsante si iscrivano?
Si esatto, in pratica nel template (nel footer) è già disponibile un modulo di newsletter.
Io ho bisogno di quel modulo al centro di una pagina dedicata, ma deve rimanere anche nel footer. Ho provato copia incolla del codice, ma ovviamente vanno in conflitto (anche cambiando i nomi delle funzioni, probabilmente sbaglio qualcosa). Quindi ho pensato di creare un nuovo <input> dove il cliente inserisce l'email, e sotto un bottone che serve per salvarla.
In pratica questo..
http://www.vestilanatura.it/richiesta-email
edit: chiaramente ho creato un layout con il modulo newsletter in content top, e funziona benissimo, ma non mi piace graficamente, quindi preferisco crearne uno nuovo
Eco-friendly Clothing Store for Man and Woman, with a wide selection of Vegan and Made in Italy clothing, bags, underwear. http://www.vestilanatura.it for join the sustainable lifestyle!
devi aggiungere anche un piccolo script java che ha la funzione di sottoscrizione e cancellazione.
Code: Select all
<script type="text/javascript"><!--
function email_subscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/subscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}
});
}
function email_unsubscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/unsubscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}
});
}
$('.newsletter input[class=\'form-control\']').on('keydown', function(e) {
$('.newsletter input[class=\'form-control\']').parent().find('a').trigger('click');
}
});
//--></script>
poi devi creare lo schema in html e successivamente la parte in php dove la colleghi al form html
codice html
Code: Select all
<form style="margin:0px;padding:0px;" method="post" action="http://www.esempio/u.php">
<p><input type="text" name="u" value="" /></p>
<p><input type="submit" value="Iscriviti" />
<input type="hidden" name="l" value="Predefinita" />
<input type="hidden" name="cmd" value="subscribe" />
<input type="hidden" name="r" value="http://www.esempio.com" /></p>
</form>
Code: Select all
method="post" action="http://www.esempio/u.php">
i miei sono solo esempi, poi se hai un po di fantasia con un po di css puoi fare qualcosa di più carino.
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
Code: Select all
<div class="newsletter-content">
<div id="frm_subscribe">
<form name="subscribe" id="subscribe">
<table>
<tbody><tr>
<td>
<div class="boss-newsletter">
<input class="form-control input-new" size="50" placeholder="Put your email address here" name="subscribe_email" id="subscribe_email" type="text">
<a class="btn btn-new" onclick="email_subscribe()">Subscribe</a>
</div>
</td>
</tr>
<tr style="display:none;">
<td><input class="form-control input-new" size="50" value="Put your email address here" name="subscribe_name" id="subscribe_name" type="text"></td>
</tr>
<tr>
<td id="subscribe_result"></td>
</tr>
</tbody></table>
</form>
</div>
</div>
In pratica va a cercare l'email nel campo footer piuttosto che in questo.
E questo sarebbe lo script..
Code: Select all
<!--
function email_subscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/subscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}
});
}
function email_unsubscribe(){
$.ajax({
type: 'post',
url: 'index.php?route=module/newslettersubscribe/unsubscribe',
dataType: 'html',
data:$("#subscribe").serialize(),
success: function (html) {
eval(html);
}
});
}
$('.boss-newsletter input[class=\'form-control\']').on('keydown', function(e) {
if (e.keyCode == 13) {
$('.boss-newsletter input[class=\'form-control\']').parent().find('a').trigger('click');
}
});
//-->
Secondo me basta cambiare i nomi delle funzioni, ma ci sto provando e non riesco a farlo funzionare..hai qualche dritta in merito?
Grazie
Eco-friendly Clothing Store for Man and Woman, with a wide selection of Vegan and Made in Italy clothing, bags, underwear. http://www.vestilanatura.it for join the sustainable lifestyle!
altrimenti devi vedere nei file del template se c'è qualche file chiamato newsletter.
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
http://www.informaticazone.it/demo/ocart2/
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
Grazie mille
Eco-friendly Clothing Store for Man and Woman, with a wide selection of Vegan and Made in Italy clothing, bags, underwear. http://www.vestilanatura.it for join the sustainable lifestyle!
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
Attachments
newsletter subscription
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
raikage wrote:attaccato trovi lo zip contenente i file per la newsletter.
Grazie mille, però mi sorge un dubbio, utilizzando questo modulo vado a separare le due newsletter? Cioè quello del template le salva da una parte, mentre questo da un'altra giusto?
Eco-friendly Clothing Store for Man and Woman, with a wide selection of Vegan and Made in Italy clothing, bags, underwear. http://www.vestilanatura.it for join the sustainable lifestyle!
https://www.opencartitalia.org
Consulenza,Sviluppo Extension per: Opencart,Magento,Prestahop,Wordpress,Ocart,Zencart,Joomla,Multimerch e SEO Specialist Certified
Info e Contatti
Users browsing this forum: No registered users and 111 guests