Jump to content

npn2531

Members
  • Content count

    1,159
  • Joined

  • Last visited

  • Days Won

    11

Reputation Activity

  1. Like
    npn2531 reacted to toniroger in Mail Manager   
    Hi, I've uploaded a full package of the addon with the xsell_query I posted yesterday and with a product_notification module.
     
    Please check that it's all fine.
  2. Like
    npn2531 reacted to sammedit in Mail Manager   
    @@npn2531
     
    For some reason this site won't let me email you. So here it is:
     
    Mail Manager Newsletter Unsubscribe Add On
     
     
     
    Add these two files to your catalog directory:
     
    unsubscribe.php

    <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, v 1.0 (/catalog/unsubscribe.php) 2003/01/24 // Programed By: Christopher Bradley (www.wizardsandwars.com) // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_UNSUBSCRIBE); if (isset($HTTP_GET_VARS['email'])) { $email_to_unsubscribe = ereg_replace('[^0-9A-Za-z@._-]', '', $HTTP_GET_VARS['email']); } else { $email_to_unsubscribe = ''; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL')); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo UNSUBSCRIBE_TEXT_INFORMATION; ?></td> </tr> </table></td> </tr> <tr> <td align="center" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_UNSUBSCRIBE_DONE, 'email=' . $email_to_unsubscribe, 'NONSSL') . '">' . tep_image_button('button_unsubscribe.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
     
     
    unsubscribe_done.php

    <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, v 1.0 (/catalog/unsubscribe_done.php) 2003/01/24 // Programed By: Christopher Bradley (www.wizardsandwars.com) // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_UNSUBSCRIBE); if (isset($HTTP_GET_VARS['email'])) { $email_to_unsubscribe = ereg_replace('[^0-9A-Za-z@._-]', '', $HTTP_GET_VARS['email']); } else { $email_to_unsubscribe = ''; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_UNSUBSCRIBE, '', 'NONSSL')); // Check and see if the email exists in the database, and is subscribed to the newsletter. $cus_subscribe_raw = "select 1 from " . TABLE_CUSTOMERS . " where customers_newsletter = '1' and customers_email_address = '" . $email_to_unsubscribe . "'"; $cus_subscribe_query = tep_db_query($cus_subscribe_raw); $cus_subscribe = tep_db_fetch_array($cus_subscribe_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php // If we found the customers email address, and they currently subscribe if ($cus_subscribe) { // Unsubscribe them tep_db_query("update " . TABLE_CUSTOMERS . " set customers_newsletter = '0' where customers_email_address = '" . $email_to_unsubscribe . "'"); ?> <td class="main"><?php echo UNSUBSCRIBE_DONE_TEXT_INFORMATION . $email_to_unsubscribe; ?></td> <?php // Otherwise, we want to display an error message (This should never occur, unless they try to unsubscribe twice) } else { ?> <td class="main"><?php echo UNSUBSCRIBE_ERROR_INFORMATION . $email_to_unsubscribe; ?></td> <?php } ?> </tr> </table></td> </tr> <tr> <td align="center" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
     
    Then add catalog/includes/languages/english/unsubscribe.php

    <?php //////////////////////////////////////////////////////////////////////////// // $Id: Newsletter Unsubscribe, (/catalog/includes/languages/english/unsubscribe.php)v 1.2 2004/04/29 // Programed By: Christopher Bradley (www.wizardsandwars.com) // Modified by Jim Keebaugh // // Developed for osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // // Released under the GNU General Public License // /////////////////////////////////////////////////////////////////////////// define('NAVBAR_TITLE', 'Unsubscribe'); define('HEADING_TITLE', 'Unsubscribe from our Newsletter'); define('UNSUBSCRIBE_TEXT_INFORMATION', '<br>We\'re sorry to hear that you wish to unsubscribe from our newsletter. If you have concerns about your privacy, please see our <a href="' . FILENAME_PRIVACY . '"><u>privacy notice</u></a>.<br><br>Subscribers to our newsletter are kept notified of new products, price reductions, and site news.<br><br>If you still do not wish to receive your newsletter, please click the button below. '); define('UNSUBSCRIBE_DONE_TEXT_INFORMATION', '<br>Your email address, listed below, has been removed from our Newsletter Subscription list, as per your request. <br><br>'); define('UNSUBSCRIBE_ERROR_INFORMATION', '<br>The email address listed below was not found in our newsletter database, or has already been removed from our newletter subscription list. <br><br>'); ?>
     
     
    Then create an unsubscribe button and post as catalog/includes/languages/english/images/buttons/button_unsubscribe.gif or draw your own and change applicable code.
     
    EDITS:
     
    admin/includes/modules/newsletters/newsletter.php
     
    Find:

    $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); $mimemessage->add_text($this->content); $mimemessage->build_message(); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); }
     
    Change to:

    // Begin Unsubscribe $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage->add_html($this->content . TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>'); $mimemessage->build_message(); $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } // End Unsubscribe
     
    In /catalog/includes/filenames.php
     
    Add:

    /// Begin Unsubscribe define('FILENAME_UNSUBSCRIBE', 'unsubscribe.php'); define('FILENAME_UNSUBSCRIBE_DONE', 'unsubscribe_done.php'); /// End Unsubscribe
     
    In admin/includes/languages/english/modules/newsletters/newsletter.php
    and admin/includes/languages/english/mm_bulkmail.php
     
    Add:

    /// Begin Unsubscribe define('TEXT_UNSUBSCRIBE', "\n\nTo unsubscribe from this newsletter, just click on the following link:\n"); /// End Unsubscribe
     
     
    In admin/includes/filenames.php
     
    Add:

    //// Begin Unsubscribe define('FILENAME_UNSUBSCRIBE', 'unsubscribe.php'); //// End Unsubscribe
     
    Then in admin/mm_bulkmail.php
     
    Find:

    // compile mailpiece $output_content_html= $template['htmlheader'].$newsletter['content'].$template['htmlfooter']; $output_content_txt= $template['txtheader'].$newsletter['txtcontent'].$template['txtfooter']; // placeholders $placeholders=array('storeurl', 'storeowner','storeemail'); $values=array(HTTP_SERVER,STORE_OWNER,STORE_OWNER_EMAIL_ADDRESS); $output_content_html=str_replace($placeholders, $values, $output_content_html); // get customer selection criteria and additional content from module require(DIR_WS_MODULES . 'mail_manager/' . $newsletter['module'] . substr($PHP_SELF, strrpos($PHP_SELF, '.')));
     
    and replace with:
     

    // compile mailpiece $output_content_html= $template['htmlheader'].$newsletter['content'].$template['htmlfooter']; $output_content_txt= $template['txtheader'].$newsletter['txtcontent'].$template['txtfooter']; require(DIR_WS_MODULES . 'mail_manager/' . $newsletter['module'] . substr($PHP_SELF, strrpos($PHP_SELF, '.'))); $unsubscribe = TEXT_UNSUBSCRIBE . '<a href="' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_CATALOG_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>'; // placeholders $placeholders=array('storeurl', 'storeowner','storeemail', '$unsubscribe'); $values=array(HTTP_CATALOG_SERVER,STORE_OWNER,STORE_OWNER_EMAIL_ADDRESS, $unsubscribe); $output_content_html=str_replace($placeholders, $values, $output_content_html);
     
    Then add $unsubscribe into your newsletter or into the template.
     
    I think that is it. It will also add an unsubscribe link to your stock newsletter setup. Let me know if you get it to work.
     
    sammedit
  3. Like
    npn2531 got a reaction from GLWalker in Mail Manager for OSC v2.3   
    Mail Manager for OSCommerce v2.3 is now available in the add-ons.
    Mail Manager is designed to:
     
    1) Send all emails in html with a text alternative. With Mail Manager all emails can be created in html complete with images, links, logos, etc. This includes order confirmation, create account, password forgotten, status update, newsletters and tell-a-friend emails
    2) Allow editing all of emails from the Admin, and for creating html templates that can be applied to all emails for a consistent and professional look.
    3) Adds a special post sales follow-up email to send to customers who have recently made a purchase complete with images, descriptions, links of purchased products, links to leave product reviews, and if the Xsell module  is installed, images, descriptions and links to recommended products. 
    4) Mail Manager adds product images to the customer initiated tell_a_friend email.
    5) A search feature is added to the admin email that makes it simple to locate a customer and send them note, etc on a templated html email.
    6) Control the rate, or speed, that emails are sent. This allows shops on shared web-hosting account to send large mailings without exceeding band-width limitations.
    7) Target for newsletters and mailings any group of customers or mailing list entries that can be identified by php queries. For example you could create a mailing to customers who have purchased a certain product and who live in a single postal code. 
     
    Download includes fully functional and editable example newsletters and templates.
  4. Like
    npn2531 got a reaction from GLWalker in Mail Manager for OSC v2.3   
    Mail Manager for OSCommerce v2.3 is now available in the add-ons.
    Mail Manager is designed to:
     
    1) Send all emails in html with a text alternative. With Mail Manager all emails can be created in html complete with images, links, logos, etc. This includes order confirmation, create account, password forgotten, status update, newsletters and tell-a-friend emails
    2) Allow editing all of emails from the Admin, and for creating html templates that can be applied to all emails for a consistent and professional look.
    3) Adds a special post sales follow-up email to send to customers who have recently made a purchase complete with images, descriptions, links of purchased products, links to leave product reviews, and if the Xsell module  is installed, images, descriptions and links to recommended products. 
    4) Mail Manager adds product images to the customer initiated tell_a_friend email.
    5) A search feature is added to the admin email that makes it simple to locate a customer and send them note, etc on a templated html email.
    6) Control the rate, or speed, that emails are sent. This allows shops on shared web-hosting account to send large mailings without exceeding band-width limitations.
    7) Target for newsletters and mailings any group of customers or mailing list entries that can be identified by php queries. For example you could create a mailing to customers who have purchased a certain product and who live in a single postal code. 
     
    Download includes fully functional and editable example newsletters and templates.
  5. Like
    npn2531 got a reaction from artstyle in Horizontal Category Menu plugin, JQuery and/or CSS   
    In your browser, click the option to 'view source' or 'view html'. Look at the menu, see if the <a>, <li> or <ul> in the menu links that are offset have styles applied, or not applied, that the menu links that are properly positioned do have. Then it is a process of figuring out why, usually a process of tedious trial and error. Remember that it is not hard to end up with style in a stylesheet high up in the stylesheet to be overridden by a style lower down the page.
  6. Like
    npn2531 got a reaction from joli1811 in Mail Manager   
    If you can see the page you are on in the address bar when looking at the blank screen you can use echo statements to find the error. Just open up the page that is blank and then starting from just below the opening <?php mark, type in several places down the page something like:
     
    echo 'line 2'; or echo 'line 50';
     
    As long as you haven't placed them within a 'if then' statement, then the echo statements you add above the error will print on the screen and the echo statements below the error will not print, and you can narrow down exactly where the error is.
  7. Like
    npn2531 got a reaction from joli1811 in Mail Manager   
    If you can see the page you are on in the address bar when looking at the blank screen you can use echo statements to find the error. Just open up the page that is blank and then starting from just below the opening <?php mark, type in several places down the page something like:
     
    echo 'line 2'; or echo 'line 50';
     
    As long as you haven't placed them within a 'if then' statement, then the echo statements you add above the error will print on the screen and the echo statements below the error will not print, and you can narrow down exactly where the error is.
  8. Like
    npn2531 got a reaction from joli1811 in Mail Manager   
    If you can see the page you are on in the address bar when looking at the blank screen you can use echo statements to find the error. Just open up the page that is blank and then starting from just below the opening <?php mark, type in several places down the page something like:
     
    echo 'line 2'; or echo 'line 50';
     
    As long as you haven't placed them within a 'if then' statement, then the echo statements you add above the error will print on the screen and the echo statements below the error will not print, and you can narrow down exactly where the error is.
  9. Like
    npn2531 got a reaction from vaggolena in Mail Manager   
    You can simply not fill in the plain text in the admin in mail manager when you compose your email. However note that all emails can have a plain text alternative anyway embedded in the email. Go to your preferred mail program and find the option to read the email source. You will see that there is always a text alternative. If you don't fill in the plain text, and send the email, and the recipient has his email set to display plain text, then they will see a text rendering of your html email which can be difficult to read.
  10. Like
    npn2531 got a reaction from vaggolena in Mail Manager   
    open catalog/includes/modules/mail_manager/order_confirm.php
     
    find:

    //send email tep_mm_sendmail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $output_subject, $output_content_html, $output_content_txt);
     
    add directly underneath:

    //send extra email to store owner tep_mm_sendmail($order->customer['firstname'] . ' ' . $order->customer['lastname'], STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $output_subject, $output_content_html, $output_content_txt);
     
    Be sure you test this
  11. Like
    npn2531 got a reaction from cata44 in Mail Manager   
    when you create order confirmation email make sure that the placeholder $ordertotal is correct, that it is the order total.
     
    note that in the admin>response mail manager the $ordertotal = order total and not delivery address.
  12. Like
    npn2531 got a reaction from mac2me in Index.php and product listing absolutely awful coding, impossible to modify   
    Most big shops use unordered lists or divs instead of tables for product listings. Yes, you would list tabular data or 'chart' data in tables, but product listings are not tables or 'charts'.
     
    The way you can get the product listings in 2.3 to look like I have the product listings in 'OSC to CSS' is to change three files. includes/modules/product_listings.php, includes/classes/boxes.php and the css file.
    (If you are using 2.3 stick with it, you can change the product listings there to look like my demo, or even better)
     
    Compare the file includes/modules/product_listing.php. The main thing I did there was change 'new productlistingbox' to 'new plistingbox'.
    Since I changed it to 'pllistingbox' I now have to create a new class in includes/classes/boxes.php called plistingbox.
     
    The classes in includes/classes/boxes.php control how the product listing is displayed. Compare includes/classes/boxes.php in 2.3 and in 'OSC to CSS'. You will see that I duplicated the classes, and renamed the duplicated classes. Then I went into the duplicated classes and changed the table tags to div tags. (Renaming is an involved process as you have to carefully go through almost every line and change stuff).
     
    If you did two things you would have this product listing issue down pat.
    1) Duplicate the classes in your 2.3 includes/classes/boxes.php
    2) Change your duplicated classes to unordered list tags or div tags instead of table tags.
     
     
    It took me weeks to walk through the box classes and change them, maybe I am slow, but expect it to be a tedious task.
    If you do get the product listing converted to ul tags it would be awesome, and you should post your solution back on the forum.
  13. Like
    npn2531 got a reaction from Harald Ponce de Leon in I'm a total noob - and I can't find any "catalog" directory   
    The term catalog directory is used to distinguish the catalog level files from the admin directory. There really is no folder called 'catalog'.
    Think of the 'catalog directory' as every file and folder on the same level as the admin folder. For example the file product_info.php is on the same level as the admin folder, thus product_info.php is by default consider to be in the catalog directory. Essentially the catalog files are the files the customer sees.
     
    It is just used as a convention, it just sounds better to say 'catalog directory' than to say 'not in the admin folder'
     
    PS - don't start a new folder called catalog, it will just confuse things needlessly. Also catalog directory and catalog folder are the same thing.
     
    PPS - the options, multiple options thing is really worked out well in OSCommerce. And there are lots of contributions to modify it. It's seems clunky because it takes getting used to. It's clunky in other shopping carts as well. Think of it as flexible and adaptable rather than clunky. It works quite well on the customer (or 'catalog') side.
×