Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Newsletter & Subscribers Module v 0.2


Recommended Posts

Newsletter Module v 0.2

Author: P&G developmment

http://www.oscommerce.com/community/contributions,535

 

I won't go into great detail with all the errors and such, but this Contrib needs some rewrite done to it. I have found numerous lines of outdated code that no longer function correctly. Mostly tep_ functions and such.

 

Fatal error: Call to undefined function: tep_set_newsletter_status() in /home/haxor/scooterproshop.com-www/catalog/admin/newsletters_subscribers_view.php on line 21

18      case 'setflag':
19        if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
20        if ($HTTP_GET_VARS['cID']) {
21           tep_set_newsletter_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);

 

I also get a blank page when I try to access the Subscription Center to modify my subscription status.

 

This is a great contribution, however it need to be updated and made "current" with the new code changes. I have seen numerous posts on this already scattered throughout the forum. I will add it here because I know this is where the author may look.

 

If the Author of this contribution, or a qualified programmer can debug this I would greatly appreciate it.

Scooterboy

Link to comment
Share on other sites

I have my newsletters all up and working and there was a lot of code changes needed to get there

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

 case 'setflag':
? ? ? if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
 ? ? if ($HTTP_GET_VARS['cID']) {
? ? ? ? ? ?tep_set_newsletter_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);
? ? ? ? }
? ? ? }

 

you will need to post some lines before and after the problem area I think possibly one of the first errors was the missing }

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

1st issue Resolved in previous thread:

 

Admin Location: /catalog/admin/categories.php?selected_box=newsletter

Action: clicked on [subscribers Admin] in the admin console for Newsletters.

Error: Fatal error: Call to undefined function: tep_array_merge() in /home/haxor/scooterproshop.com-www/catalog/admin/newsletters_subscribers_view.php on line 469

 

Solution: change tep_array_merge to array_merge

Before
469        $cInfo_array = tep_array_merge($subscribers, $customer_info);

After
469        $cInfo_array = array_merge($subscribers, $customer_info);

File: /catalog/admin/newsletters_subscribers_view.php

Occurances: 1

Scooterboy

Link to comment
Share on other sites

2nd issue:

 

Admin Location: /catalog/admin/newsletters_subscribers_view.php

Action: In [subscrivers Admin] Click on Red or Green button light under the Subscribe Heading

Error: Fatal error: Call to undefined function: tep_set_newsletter_status() in /home/haxor/scooterproshop.com-www/catalog/admin/newsletters_subscribers_view.php on line 21

 

<?php
/*
?$Id: customers.php,v 1.71 2002/04/29 15:12:19 hpdl Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2002 osCommerce

?Released under the GNU General Public License
*/

?require('includes/application_top.php');

?if ($HTTP_GET_VARS['action']) {
? ?switch ($HTTP_GET_VARS['action']) {

? ? ?case 'setflag':
? ? ? ?if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
? ? ? ?if ($HTTP_GET_VARS['cID']) {
21->? ?tep_set_newsletter_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag']);
? ? ? ? ?}
? ? ? }
? ? ? ?tep_redirect(tep_href_link(FILENAME_NEWSLETTERS_SUBSCRIBERS_VIEW, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->subscribers_id));
? ? ? ?break;
? ?
? ? ?case 'setflag1':
? ? ? ?if ( ($HTTP_GET_VARS['flag1'] == '0') || ($HTTP_GET_VARS['flag1'] == '1') ) {
? ? ? ?if ($HTTP_GET_VARS['cID']) {
? ? ? ? ? ?tep_set_blacklist_status($HTTP_GET_VARS['cID'], $HTTP_GET_VARS['flag1']);
? ? ? ? ?}
? ? ? }

 

Note: If I click on the Red or Green Light for Blacklist heading, it does nothing at all.

Edited by ScooterProShop.com

Scooterboy

Link to comment
Share on other sites

3rd Issue (moving along)

 

This is after a customer subscribes to the newsletter and gets the confirmation email. In the email is a link for a customer to manage their subscription status through a subscription center page. Nice feature.

 

I as the customer, follow the link and get a blank page when I try to access the Subscription Center to modify my subscription status. BOOO! I am not happy and feel SPAM coming on from this subscription I just signed up for. Not good. I panic and call the 800 # and tell them to piss off. (dramatized a bit, but who knows?)

 

For testing reasons I will link that page HERE.

 

That is all I get. Any ideas how to fix this up ?

Edited by ScooterProShop.com

Scooterboy

Link to comment
Share on other sites

Robert,

 

I had all kinds of issues with the welcome email that is sent once someone signs up for the newsletter. First, it was talking Palm Trees, and I didn't see any info how to remove/edit the welcome text (hard coded for some reason).

 

I could never understand when/how the header/footer worked, plus, since I was sending out an HTML newsletter, I simply put in my HTML at the bottom of the newsletter, a link to the page where a customer can enter their email address and unsubscribe.

 

I deleted all the header/footer information that gets "inserted" into the welcome email as well as the actual newsletter emails.

 

Overall, I think it is a great contribution, just a few tweaks that seems like everyone learns along the way, but forget what they changed, so the contribution never gets updating/improved.

 

I think theremight be a fix for the blackmail thing, I'll look at my bookmarks tonight or tomorrow.

Link to comment
Share on other sites

Robert, I just tried something on my site.

 

I went in and changed my subscription to newsletter to blackmail using the red/green buttons. Nothing changed.

 

I opened up the account for that email address, using the drop down menu, selected that email address to be "black listed".

 

The button on the subscribers admin page turned to green, but I sent a newsletter, and that email address was blacklisted.

 

So, looks like you can "get around" the blacklist green/red button issue by going into edit the customer and select subscribe/nosubscribe via the pull down menu.

 

Just looked again, and it could be a misinterpretation of what the color coding means:

 

Blacklist - Green means blacklisted, red means *not* blacklisted, send email if red button.

Subscribed - Green means subscribed, red means non-subscribed, send email if green button.

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...