Jump to content

Blok newsletter - "Error during subscription" - vyřešeno


karelzemek

Recommended Posts

Zkus modul odinstalovat, znova nainstalovat, zkusit se přihlásit k odběru.

Tím myslim jak v TOOLS -> Newsletter 2.0, tak v BLOCÍCH Newsletter 1.4.


V TOOLS ?

Tam jsou jen tyhle položky:
Languages
Translations
Tabs
Quick Accesses
Aliases
Import
Subdomains
DB backup
CMS
Generators


Zkusil jsem oba moduly (Newsletter v2.0, Newsletter block v1.4) odinstalovat, smazat, znovu nahrát a nainstalovat. NewsLetter 1.4 jsem musel instalovat nadvakrát - poprvé se ukázalo, že modul není správně nainstalován, tak jsem klikl podruhé na "instalovat" a nainstaloval se. Koukl jsem do databází a nikde není tabulka ps_newsletter. (?!)


řešil jsem to před nedávnem na jednom anglickém fóru, dostal jsem odpověď, ale nepochopil jsem ji, zkus to:-)


For Karel,

my newsletter was not working
so i went into the blocknewsltter.php file and found the sql create table statment :

CREATE TABLE ‘._DB_PREFIX_.’newsletter (
`id` int(6) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`newsletter_date_add` DATETIME NULL,
`ip_registration_newsletter` varchar(15) NOT NULL,
`http_referer` VARCHAR(255) NULL,
PRIMARY KEY(`id`)
)
»
open your database and run the statment.
it will create the appropriate table and replace »‘._DB_PREFIX_.’ »
with you actual database prefix the standard is « ps_ »

Good Luck
Link to comment
Share on other sites

Máš ten sql příkaz vložit do toho souboru a nainstalovat, aby to v DB vytvořilo tabulku, ale je mi záhadný, pokud používáš officiální instalaci, že ti to nefunguje...


Tak v tom případě netuším kam ho mám vložit do toho souboru v příloze.....?

Je to oficiální verze, jen upravená (vzhled) pro šablonu kterou používám.

blocknewsletter.php

Link to comment
Share on other sites

Jéé, sem si to blbě přečetl, stačí když tam na řádku tušim 33 přepíšeš to:

._DB_PREFIX_.



na tvůj prefix kterej používáš v DB, standardně je

ps_



takže ten tvůj sql co tam je bude vypadat takhle:

CREATE TABLE 'ps_'newsletter (
           `id` int(6) NOT NULL AUTO_INCREMENT,
           `email` varchar(255) NOT NULL,
           `newsletter_date_add` DATETIME NULL,
           `ip_registration_newsletter` varchar(15) NOT NULL,
           `http_referer` VARCHAR(255) NULL,
           PRIMARY KEY(`id`)
       ) ENGINE=MyISAM default CHARSET=utf8');

Link to comment
Share on other sites

S tím už jsem si právě hrál, ať jsem zkusil nahradit ._DB_PREFIX_. za ps_ jenom ve zmiňovaném odstavci nebo v celém .php, tak pokaždé se při nahrání modulu na ftp ukázala hláška:

Parse error(s) in module(s)
blocknewsletter

a modul nebyl vůbec vidět v seznamu modulů......

Link to comment
Share on other sites

Nakonec se mi to podařilo rozchodit, ale sám vlastně nevim jak - zkusil jsem nainstalovat NL ze starší verze presty....ta nefungovala, tak jsem jí odinstaloval a nainstaloval opět tuhle verzi...a vida.funguje...nj, někdy prostě stačí zapnout a vypnout :-D

Link to comment
Share on other sites

Thanks jakcrabbit, your post helped me (and so did google translate) since i don't speak one word of Czech, here's what I did:

Ok, I have been looking for this too and have found the answer in the Czech forum, using google translate. It turns out that the newsletter table never got created in the database, which is why I could only register with customers that already existed in my customer database. It had nowhere to put the customers that had only used the subscription module and thus the error.

Here's what you need to do:

1. Go to the Prestashop backend and uninstall ALL Newsletter applications, I had three: Newsletterv2.0, Newsletter block v1.4, Newsletter v1.0. UNISTALL them by clicking the checkboxes next to them and do them all at once in a batch.

2. Next, install only: Newsletterv2.0 & Newsletter block v1.4 (NOT Newsletter v1.0) You may or may not get an error, doesn't matter.

3. Next go to your database admin tool. I use PHPMyAdmin where I click on my shop's database and then SQL at the top

4. Enter the following query via SQL, make sure you change the YOURDATABASENAME in the below code to the full name of your database (jakcrabbit's was a little bit off, but close enough:

CREATE TABLE `YOURDATABASENAME`.`ps_newsletter` (
     `id` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
     `email` VARCHAR( 255 ) NOT NULL ,
     `newsletter_date_add` DATETIME NULL ,
     `ip_registration_newsletter` VARCHAR( 15 ) NOT NULL ,
     `http_referer` VARCHAR( 255 ) NULL
) ENGINE = MYISAM default CHARSET=utf8



5. ???????

6. PROFIT!!!!

I can confirm this worked for me on the newest prestashop! Now to export the customers, you go to the Modules in Backend and click configure on the Newsletterv2.0 module.

The "Export Newsletter Subscribers" option will only export the customers in the table you just created. The "Export customers" section will only export data from the customers table, no matter what you chose, it will omit the newsletter table. All you need to do if combine the two tables and you have your subscriber base!

Will accept beer as donations.

Link to comment
Share on other sites

  • 2 weeks later...
Thanks jakcrabbit for the reply. I have downloaded the latest Presta 1.2.5 but the version of the newsletter is still 1.0...

EDIT: It was indeed in French for me... :)


Newsletter v2.0 is located in the tools section of the modules page.

Hit CTRL + F and search for "newsl", it should be there
Link to comment
Share on other sites

  • 7 months later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...