Post by DannyMacD » Mon Oct 26, 2009 3:07 am

hello,

i have searched for this and found many posts on this but nothing that is solid.

i am after a newsletter module that i can have. it will be placed in either the left or right column. the user only needs to add an email to e included and not need an account.

example of image that i require from another site


has this been done? if so can someone point me in the right direction

thank you :)

Attachments

newsletter.tiff

newsletter.tiff (18.27 KiB) Viewed 9164 times


Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by vimal » Mon Oct 26, 2009 6:54 am

Exactly what I am after too. Someone please help!

Thanks!
Vimal.

www.beeshop.se
Starta webbshop, Starta e-butik, Starta e-handel


Active Member

Posts

Joined
Wed Aug 26, 2009 8:54 am
Location - Sweden

Post by DannyMacD » Thu Oct 29, 2009 5:56 am

anyone :(

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by yagovdik » Sun Nov 01, 2009 12:49 am

Hi, guys.

Just finished implementation of this. Let's test it =)
Thanks supreme for code fragments (http://forum.opencart.com/viewtopic.php ... ter#p20001)

So,
1. Create mysql table for our subscribers

Code: Select all

-- Subscriber table
CREATE TABLE `subscriber` (
  `email` varchar(96) collate utf8_unicode_ci NOT NULL,
  `name` varchar(128) collate utf8_unicode_ci NOT NULL default '',
  `status` int(1) NOT NULL,
  PRIMARY KEY  (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2. Apply patch from attach

Code: Select all

cd /path/to/opencart/instance
tar -xjf newsletter_module.tar.bz2
patch -p1 < newsletter_module_opencart.patch
rm catalog/view/theme/default/template/subscription/edit.tpl
Do not disturb about excessive file subscription/edit.tpl - added mistaken

3. Resolve conflicts if any (I've used Open cart 1.3.2)

4. Going to admin->configuration->user groups and set permissions for admin user to newly added module (module/newsletter)

5. install Newsletter module and configure it.

5.1 Edit catalog/view/theme/default/template/module/newsletter.tpl in accordance with your design.

6. say "Thank you, dude" to me ;-)

If you have some problems let me know.

Note: I didn't test it yet. So, yours feedbacks are welcome.

thanks
Sorry for bad english

Attachments

Opencart newsletter module


Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by myopen » Sun Nov 01, 2009 10:02 am

sorry .. Which means: "2. Apply patch from attach" ??????... please, you better ears? .. I did not understand where to use this patch and do not know where to insert ...

New member

Posts

Joined
Fri Aug 14, 2009 9:27 pm

Post by yagovdik » Sun Nov 01, 2009 4:49 pm

Oh,
Are you windows user?
OMG, please remove remove it from your box. It's really urgent.
Kidding of course.

I will investigate the way to apply patch under windows =)

----------------
Well, you can use this
http://gnuwin32.sourceforge.net/install.html
Cannot test it myself because have no windows box nearly (And I am happy =))

Maybe FAR manager have some plugins for patches, not sure.

BTW, also you can see inside the patch (say, with notepad) and aplly the same changes to your opencart manually.
Lines marked by '-' at left is deleted by patch
Lines marked by '+' at left is added by patch
It's easy.

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by DannyMacD » Tue Nov 03, 2009 7:44 pm

has anyone tested this and have this working live ??

i cant really get my head around the install process (so used to Q, fido-x, etc simple installs :P)

many thanks

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by yagovdik » Tue Nov 03, 2009 8:32 pm

Guys, what's the problem?
Here is archive with patch.
Patch is difference of code.

Please explain me your problem and i will help you all. =)

You can ask me directly (yagovdik@gmail.com ; ICQ: 171169337)

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by Qphoria » Tue Nov 03, 2009 10:19 pm

The problem is likely that 99% of the world has no idea what or how to use a patch file

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yagovdik » Tue Nov 03, 2009 10:30 pm

Have no idea how to help them.

Well, tomorrow I'll prepare patched opencart version for this.

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by Qphoria » Tue Nov 03, 2009 10:40 pm

ehh.. I think you might want to try to utilize the opencart module system. A newsletter module should not have to touch any of the core code. There may need to be a small mod to the newsletter mailing page to pull the email addresses from both tables, but that's it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yagovdik » Tue Nov 03, 2009 11:12 pm

Sure,
Did you see patch?

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by Qphoria » Tue Nov 03, 2009 11:21 pm

Yea, im looking at it now.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Tue Nov 03, 2009 11:28 pm

The problem is that most webhosts don't allow this stuff to be run. Perhaps if you request SSH access but I often get "no permission" and "could not delete".. as i got with your patch as well.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Wed Nov 04, 2009 12:46 am

Ok... as part of a package installer mod I am working on, I've got a php based udiff patcher. Seems to work ok with your file when i remove the /a and /b from your patch. Everything worked except it didn't seem to create these folders:

catalog/controller/subscription
catalog/language/english/subscription
catalog/model/subscriber

Everything else worked fine. Seems maybe the php patcher doesn't handle folder creation properly. File creation seemed to work fine tho as long as the folder already existed.

Also, the module template doesn't seem to use the default template but some custom one so it doesn't match in the default template.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yagovdik » Wed Nov 04, 2009 2:31 am

hm,
Maybe i have missed something during patch preparing (saying about subscriber dir).
Yes, I didn't want to make a great universal module for OpenCart... I've just share my expirience for all.

If its needed by anyone I will prepare a package for installing this module simple. Please let me know if anyone have info/expiriense in module publishing


Thanks all

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am

Post by Qphoria » Wed Nov 04, 2009 11:00 pm

Nah, I think the subscriber folder is there, just my php patch script wasn't creating them. I've updated the script to create full paths as needed and it worked fine.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by DannyMacD » Wed Nov 04, 2009 11:05 pm

hey Q,

have you redone the install process?

if so is it something you can share (hehe)

cant get my head around patching core files n stuff.. sounds too over my head lol

thank you :)

plus your install processes are easy :)

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by Qphoria » Wed Nov 04, 2009 11:09 pm

Well its actually quite involved.. edits a lot of files.

I've actually started working on a package installer system that will support patch files. I left it on the backburner but after playing with this patch file, i got it working pretty good so I'm trying to create a tool that will allow people to easily upload zip files and have them autoinstall.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yagovdik » Thu Nov 05, 2009 5:07 am

The main idea is good. But I am worrying about security aspect.

Sinse almost all hosting boxes have unix on board, maybe it will be better to add php script in the document root with the following content:

Code: Select all

<?php
print_r(system("patch -p1 $patch_filename"));
?>
Then call it via HTTP
*Then DELETE it*

Also we always can have problems with patching (conflicts in lines numbers for example in case when your code already affected by other patch)

Good luck.

Newbie

Posts

Joined
Sun Nov 01, 2009 12:20 am
Who is online

Users browsing this forum: No registered users and 13 guests