Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2006
    Location
    City Drama in Greece
    Posts
    160
    Plugin Contributions
    6

    Default Subscription System with Auto Menu Pages

    /**
    *
    * ================================
    * Instructions for Auto Menu Pages
    * ================================
    *
    * A new Project for Zen Cart compatible with version 1.3.7
    * started by Charis Chrisochoou.
    *
    * ================================
    * Description - Features - History
    * ================================
    *
    * This Project includes modified files for a "Subscription System" setup,
    * Tabbed Products Lite v3.8, and a new page in admin am_pages.php, which
    * is based on ezpages.php. The main idea started when one of my clients
    * wanted to make a new web page for soccer in Greece, www.doctorbet.gr/gr
    * We needed to make a system for Subscribers...a new chalenge for me !!!
    * I am new in PHP and MySQL but have enough experience with computers and
    * internet, so I had to read a lot! Well now we running a web site for
    * subscribers, (they can pay by Visa through Eurobank in Greece) based on
    * the above contributions in combination with my project.
    *
    * How it works ?
    *
    * Using the downloads feature, system checks automatically when subscription
    * has expired, where "subscription" is just a downloadable product !
    *
    * If subscription is active (not expired) we provide the user the content, else
    * we inform him that subscription has expired and we provide a link for renewall.
    * As for the charges, lot of Bank's provide nice tools you can use in their backoffice
    * if you want to charge periodically etc.
    *
    * To reach a downloadable product, you go to account history info which uses the file
    * "tpl_account_history_info_default", which requires (if downloads are enabled)
    * the file "tpl_modules_downloads.php". So I wanted to provide content instead of a
    * download link. This was easy. But I should find a way so I could create a menu in this area.
    *
    * After some thoughts I deciced to use only some lines of code of the file "tpl_product_info_display.php"
    * as it was modified in the contribution Tabbed Products Lite v3.8. Before all I had install and tested
    * this contribution and I discovered many ways to add custom buttons to a zen cart shop, editing and
    * updating it's database where entries where `product_description`.
    *
    * This gave me the idea to make a new file to call it with "require", where I should display the download
    * link in the file "tpl_modules_downloads.php".
    *
    * This is the file I used some lines of code of the file "tpl_product_info_display.php". The tip was that
    * I gave a new value to the variable "$products_description". The value of a define inside this file.
    * This define was "responsible" to keep all other defines where every define was a name of a button or
    * content of a button where every button define had to be inside <!--% %--> tags, as this is the way that
    * Tabbed Products Lite using to construct buttons and content.
    *
    * OK but now what ? How can we update the content ? I made a file with button name defines and some other
    * files with content defines which they were all included with "require" in my new file. So to change
    * button names or content we could not have graphical interface though administration area and we should
    * every time edit all these files.
    *
    * As my experience with PHP and MySQL started to "grow"? ; I thought it would be a good idea to start a
    * new project to manage all this content through Admin area. As for the defines I though they could be
    * just variables taken from queries, buttons and content should be recorder in a new table and there
    * should be a new page in Admin to edit this table. This way "Auto Menu Pages" started. Maybe some say
    * "Why you do not modify ezpages to a different menu?" Yes, maybe we can even use css menu from the admin
    * or any other css menu BUT using Auto Menu Pages menu it is just like using Tabbed Products Lite in a
    * shop. The benefit is that once the file am_pages.php load, we have all buttons and content in front of
    * us, ready to "surf"? ; VERY FAST once all queries are done and content is "included" inside the buttons !!!
    *
    * For me it was a new chalenge as I was new to all of these things. So I thought it was a good idea to copy
    * ezpages.php code and modify it to my new table needs. After one day it was working just fine but now what ?
    *
    * The Project stuck here because I was not able to construct the right queries, so I made some custom queries
    * only for my client's web page, just to provide the content I needed. You can see the first Auto Menu here :
    * http://www.doctorbet.gr/gr/index.php?main_page=xthesina
    *
    * WELL, I AM SEARCHING FOR DEVELOPERS, USERS AND ZEN CART SPECIALISTS TEAM TO WORK ON THIS PROJECT.
    *
    * Below you can find the installation of the new table and some new config values. I also provide some files
    * in a zip. All files I made or modified for a Subscription System to work with Auto Menou Pages.
    *
    *
    *
    * ================================================================================ ======================
    * INSTALLATION - INSTALLATION - INSTALLATION - INSTALLATION - INSTALLATION - INSTALLATION - INSTALLATION
    * ================================================================================ ======================
    *
    * 1. First go to Admin->Tools->Install SQL Patches
    * Copy all the following and paste it in the text area
    * of the page SQL Query Executor ( admin/sqlpatch.php )
    *
    * The following installs one new database table called `am_pages`, one new cfg group value and eight new cfg values
    * for AM Pages Configuration, in databases without prefix defined. If you have defined prefix for your database
    * and even you do not remember it, see the attached file prefix_help.txt for help.
    *
    * DO NOT INSTALL THE FOLLOWING AS IT IS IF YOU HAVE PREFIX FOR YOUR DATA BASE TABLES
    *
    * After you install the following you will be able to go to :
    *
    * Admin->Configuration->AM Pages Config but there is no need to configure anything there yet (Project is running)
    * ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ############################################################__
    *
    **/


    INSTALL


    CREATE TABLE `am_pages` (`am_page_id` int(11) NOT NULL auto_increment,`am_page_status_id` int(1) NOT NULL default '1',`am_page_button_title` varchar(64) NOT NULL default '',`am_page_html_text` text,`am_page_menu_group` int(11) NOT NULL default '0',PRIMARY KEY (`am_page_id`)) TYPE=MyISAM AUTO_INCREMENT=1;
    INSERT INTO configuration_group VALUES ('', 'AM Pages Config', 'Auto Menu Pages Config', '1', '1');
    UPDATE configuration_group SET sort_order = '0' WHERE configuration_group_title LIKE 'AM Pages Config' LIMIT 1;
    UPDATE configuration_group SET configuration_group_id = '2810' WHERE configuration_group_title LIKE 'AM Pages Config';
    INSERT INTO `configuration` VALUES ('','Are Auto Menu Pages protected or public - Override','AM_P_OVER','1','Set this to 0 if you want all Auto Menu Pages to be protected.<br /><br />This way you can override all Auto Menu Pages protection configuration.<br /><br />Setting this to 1 your configuration in every page will not be overriden.<br /><br />0= off 1= on',2810,1,now(),now(),NULL,"zen_cfg_select_option(array('0','1'),");
    INSERT INTO `configuration` VALUES ('', 'AM Pages to disable left-column', 'AM_P_DLCL', '0', 'AM Pages on which to NOT display the normal "left" column (of sideboxes) for your site.Simply list page ID numbers separated by commas with no spaces.Page ID numbers can be obtained from the Auto Menu Pages screen under Admin->Tools.ie: 14 or leave blank.', 2810, 2, now(), now(), NULL, 'zen_cfg_textarea_small(');
    INSERT INTO `configuration` VALUES ('', 'AM Pages to disable right-column', 'AM_P_DRCL', '0', 'AM Pages on which to NOT display the normal "right" column (of sideboxes) for your site.Simply list page ID numbers separated by commas with no spaces.Page ID numbers can be obtained from the Auto Menu Pages screen under Admin->Tools.ie: 14 or leave blank.', 2810, 3, now(), now(), NULL, 'zen_cfg_textarea_small(');
    INSERT INTO `configuration` VALUES ('', 'First Button Title prefix name - Override', 'AM_P_FBPN', 'Main Page', 'This is for overriding all first buttons titles in all AM Pages.<br /><br />The default value is Main Page. Give another name or leave blank', 2810, 4, now(), now(), NULL, 'zen_cfg_textarea_small(');
    INSERT INTO `configuration` VALUES ('', 'General Settings A - 0-5', 'AM_P_GSAN', '0', 'There is no need to change something here.<br /><br />This is only for future use if needed.<br />0= AMP GS A 0<br />0= AMP GS A 1<br />0= AMP GS A 2<br />0= AMP GS A 3<br />0= AMP GS A 4<br />0= AMP GS A 5', 2810, 5, now(), now(), NULL, "zen_cfg_select_option(array('0', '1', '2', '3', '4', '5'),");
    INSERT INTO `configuration` VALUES ('', 'General Settings B - 0-5', 'AM_P_GSBN', '0', 'There is no need to change something here.<br /><br />This is only for future use if needed.<br />0= AMP GS B 0<br />0= AMP GS B 1<br />0= AMP GS B 2<br />0= AMP GS B 3<br />0= AMP GS B 4<br />0= AMP GS B 5', 2810, 6, now(), now(), NULL, "zen_cfg_select_option(array('0', '1', '2', '3', '4', '5'),");
    INSERT INTO `configuration` VALUES ('', 'General Settings C - Small Text Area', 'AM_P_GSCTAS', '0', 'There is no need to change something here.<br /><br />This is only for future use if needed.',2810, 7, now(), now(), NULL, 'zen_cfg_textarea_small(');
    INSERT INTO `configuration` VALUES ('', 'General Settings D - Text Area', 'AM_P_GSDTA', '0', 'There is no need to change something here.<br /><br />This is only for future use if needed.',2810, 8, now(), now(), NULL, 'zen_cfg_textarea(');



    UNINSTALL - Use the following in Admin->Tools->Install SQL Patches to uninstall all the above installation if needed

    DELETE FROM `configuration_group` WHERE configuration_group_title LIKE 'AM Pages Config';
    DELETE FROM `configuration` WHERE `configuration_group_id` = '2810';

    ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ################################################################################################################################################################ ############################################################___


    IF YOU NEED A ZEN CART FOR SUBSCRIPTIONS ONLY, DO ALL THE FOLLOWING :


    /**
    *
    * 2. Make a new directory(catalog) in includes and name it "subscribers"
    *
    * 3. In your topic file includes\configure.php add the line :
    * define('DIR_WS_SUBSCRIBERS', DIR_WS_INCLUDES . 'subscribers/');
    * and uploaded it.
    *
    * ATTENTION - ATTENTION - ATTENTION - ATTENTION - ATTENTION - ATTENTION - ATTENTION - ATTENTION - ATTENTION
    *
    * Do not modify your topic file includes\configure.php before you download the "valid" one from your server
    * because the includes/configure.php file in your server keeps all "valid" data. So FIRST DOWNLOAD the file
    * includes/configure.php and then edit it.
    *
    * 4. In your topic file includes\database_tables.php add the line :
    * define('TABLE_AM_PAGES', DB_PREFIX . 'am_pages');
    * and uploaded it.
    *
    * 5. From the attached zip, upload the files :
    *
    * - am_pages.php to your admin directory.
    * - am_pages_queries.php to your catalog/includes/subscribers directory.
    * - tabbed_products_lite_override.php to your catalog/includes/modules directory.
    * - am_pages_menu_construction.php to your catalog/include/subscribers directory.
    * - am_pages_lang.php to your admin/includes/languages/english/extra_definitions directory.
    * - am_pages_tools_dhtml.php to your admin/includes/boxes/extra_boxes directory.
    * - am_pages_file_name_definition.php to your admin/includes/extra_datafiles directroy.

    TO BE CONTINUED

    THIS IS THE FIRST PART

    SECOND PART WHEN I HAVE TIME
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2007
    Location
    California, USA
    Posts
    233
    Plugin Contributions
    0

    Default Re: NEW Subscription System with Auto Menu Pages

    I was just browsing on the downloads page and came across your module. So I thought I would try and see what type of support you had on the forum. (Just a thought - you should maybe have this thread linked to your download page).

    This looks fantastic! We were looking for something like that for our video content for our website - we sell merchandise for Krav Maga (an extremely practical self defense system).

    This will be great MOD for offering the video content as a download/viewing for subscribers only. Our video content is still in development and are still complying the footage, but your module looks very interesting.

    Anyway I will have a look at the MOD and post my findings. It maybe awhile as I have a lot on at the moment. But your post looks very detailed and very interesting.
    Thanks
    Supersnow

  3. #3
    Join Date
    Apr 2006
    Location
    City Drama in Greece
    Posts
    160
    Plugin Contributions
    6

    Default Re: NEW Subscription System with Auto Menu Pages

    Dear all,

    As about this Subscription System which content is updated through module AM Pages ( Auto Menu Pages ) in admin, it is already running in my client's web site www.doctorbet.gr

    Well, because of the reason I was developing PC Configurator, I stopped developing this module (Subscription System).

    Anyway, it was not ready for wide use, as my skills in PHP did not allow me to write the right code for this module.

    Now I am ready to develop these modules ( both Subscription System and AM Pages ) but this would take some time as I am still developing PC Configurator.

    I somebody needs these package ( Subscription System works in combination with AM Pages ) POST here and I will try to write instructions.

    Have in mind that for this module to work you should install Tabbed Products Lite.

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: NEW Subscription System with Auto Menu Pages

    THIS IS THE FIRST PART

    SECOND PART WHEN I HAVE TIME
    So does this mean zip file/instructions you have posted so far
    are not complete and therefore will not work correctly?

  5. #5
    Join Date
    Apr 2006
    Location
    City Drama in Greece
    Posts
    160
    Plugin Contributions
    6

    Default Re: Subscription System

    Subscription system works perfect in this web site : www.doctorbet.gr

    There are over 400 users since August 2007 and over 100 subscriptions since September 2007.

    How it works :

    It is based on downloads module.

    There are some option names with option values.

    In the attribute controller for example we have an option name Subscription for 1 month.

    We add a "virtual" file for download, so we can count the 31 days for this subscription.

    Some core files have changed.

    So, this way we check if a subscription is not expired and we "load" a spesific page.

    All this was conected with Auto Menou Pages module which was based on another module. Now we have made some specific pages to load.

    This way we control the content for subscribers.

    Also there are some more restrictions in the product_info_display page for those who try to see "restricted" content.

    Some of the code written:



    tpl_product_info_display :
    ########################################___
    Code:
    <?php 
    $pid = $_GET[products_id];
    $cid = $_SESSION['customer_id'];
    $get_referal = $db->Execute("SELECT customers_referral FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".$cid."'");
    $referal  = $get_referal->fields['customers_referral'];
    
    if(!$_SESSION['customer_id'] and $pid == '9' 
    or !$_SESSION['customer_id'] and $pid == '10' 
    or !$_SESSION['customer_id'] and $pid == '11'
    or !$_SESSION['customer_id'] and $pid == '12'
    or !$_SESSION['customer_id'] and $pid == '13'
    or !$_SESSION['customer_id'] and $pid == '14') { ?>
    
    <SCRIPT language="JavaScript">
    window.location.replace("http://www.doctorbet.gr/gr/index.php?main_page=page&id=9&chapter=0");
    </SCRIPT>
    
    <?php }
    
    if($cid != "" and $referal <> '1' and $pid == '9'
    or $cid != "" and $referal <> '1' and $pid == '10'
    or $cid != "" and $referal <> '1' and $pid == '11'
    or $cid != "" and $referal <> '1' and $pid == '12'
    or $cid != "" and $referal <> '1' and $pid == '13'
    or $cid != "" and $referal <> '1' and $pid == '14') { ?>
    <SCRIPT language="JavaScript">
    window.location.replace("http://www.doctorbet.gr/gr/index.php?main_page=product_info&products_id=7");
    </SCRIPT>
    <?php } ?>

    ################################################################################___




    tpl_modules_downloads :

    ##################################################___

    Code:
    <?php require(DIR_WS_MODULES . zen_get_module_directory('downloads_ms001.php')); ?>
    
    <?php if ($downloads->RecordCount() > 0) { ?>
    
    <frameset>
    
    <?php
        while (!$downloads->EOF) {
          list($dt_year, $dt_month, $dt_day) = explode('-', $downloads->fields['date_purchased_day']);
          $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads->fields['download_maxdays'], $dt_year);
          $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
          
    ?>
               
    <!-- left box -->
    <?php
    //      if ( ($downloads->fields['download_count'] > 0) && (file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename'])) && ( ($downloads->fields['download_maxdays'] == 0) || ($download_timestamp > time())) ) {
          if ( (file_exists(DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']) && (($downloads->fields['download_count'] > 0 && $download_timestamp > time()) || $downloads->fields['download_maxdays'] == 0)) ) {
            $zv_filesize = filesize (DIR_FS_DOWNLOAD . $downloads->fields['orders_products_filename']);
            if ($zv_filesize >= 1024) {
              $zv_filesize = number_format($zv_filesize/1024/1000,2);
              $zv_filesize_units = TEXT_FILESIZE_MEGS;
            } else {
              $zv_filesize = number_format($zv_filesize);
              $zv_filesize_units = TEXT_FILESIZE_BYTES;
            }           
    ?>
           <br><font color="#FF0000"><b><?php echo "και λήγει : "?><?php echo ($downloads->fields['download_maxdays'] == 0 ? TEXT_DOWNLOADS_UNLIMITED : zen_date_long($download_expiry)); ?></font></b>
           <br><?php require(DIR_WS_SYNDROMITES . 'diades.php'); ?>
    
    <?php } else { ?>
    
           
           <?php echo IMERES_SYNDROMIS; ?>
           <?php echo $downloads->fields['download_maxdays']; ?>
           <?php echo IMERES; ?>
           <?php echo "και έληξε την "?><?php echo ($downloads->fields['download_maxdays'] == 0 ? TEXT_DOWNLOADS_UNLIMITED : zen_date_long($download_expiry)); ?>
           <br>
           <br>
           <?php echo SUBSCRIPTION_EXPIRED;?>
    
    <?php
          }
    ?>
    
        
    <?php
        $downloads->MoveNext();
        
        }
    
    ?>
      </frameset>
    
    <?php
    // old way
    //    if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {
    // new way
          if (!($_GET['main_page']==FILENAME_MS001)) {
    ?>
    <p><?php printf(FOOTER_DOWNLOAD, '<a href="' . zen_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>'); ?></p>
    <?php } else { ?>
    <?php
    // other pages if needed
          }
    ?>
    
    <?php
    } // $downloads->RecordCount() > 0
    ?>
    
    <?php
    // download is not available yet
    if ($downloads_check_query->RecordCount() > 0 and $downloads->RecordCount() < 1) {
    ?>
     <fieldset><?php echo DOWNLOADS_CONTROLLER_ON_HOLD_MSG ?></fieldset>
    <?php
    }
    ?>
    ##############################################################################################################___





    A custom page with custom menu :

    (We load this page ( require ) from inside of one of our tpl_modules_download pages )
    Code:
    <body bgcolor="#F5FBEE">
    
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#E3F1CD" width="100&#37;" id="AutoNumber1" height="839" align="left">
      <tr>
        <td width="20%" align="center" height="24" bgcolor="#598725"><b>
        <font face="Tahoma" size="1" color="#FFFFFF"><span lang="el">
    <?php echo '<a href="' . zen_href_link(FILENAME_MS001, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">Μηνύματα</a>'; ?>
        </span></font></b></td>
        <td width="20%" align="center" height="24" bgcolor="#598725"><b>
        <font face="Tahoma" size="1" color="#F5FBEE"><span lang="el">
    <?php echo '<a href="' . zen_href_link(FILENAME_PRIMERAS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">Προγνωστικά Ημέρας</a>'; ?>
        </span></font></b></td>
        <td width="20%" align="center" height="24" bgcolor="#598725"><b>
        <font face="Tahoma" size="1" color="#F5FBEE"><span lang="el">
    <?php echo '<a href="' . zen_href_link(FILENAME_KOUPONI, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">Το Κουπόνι σε 1΄</a>'; ?>
        </span></font></b></td>
        <td width="20%" align="center" height="24" bgcolor="#598725"><b>
        <font face="Tahoma" size="1" color="#F5FBEE"><span lang="el">
    <?php echo '<a href="' . zen_href_link(FILENAME_EPIMERAS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">Επιλογή Ημέρας</a>'; ?>
        </span></font></b></td>
    ##############################################################################################################__


    This is the old way to construct the menu :
    Code:
    <?php 
          require(DIR_WS_SYNDROMITES . 'am_pages_query_simerina.php');
    ?>
    
    <?php
    
    define("TELIKO_MENOU_SYNDROMITWN", '' . $start_text . '
    <!--%' . $bt_1  . '%-->' . $pg_1  . '<!--%' . $bt_2  . '%-->' . $pg_2  . '
    <!--%' . $bt_3  . '%-->' . $pg_3  . '<!--%' . $bt_4  . '%-->' . $pg_4  . '
    <!--%' . $bt_5  . '%-->' . $pg_5  . '<!--%' . $bt_6  . '%-->' . $pg_6  . '
    <!--%' . $bt_7  . '%-->' . $pg_7  . '<!--%' . $bt_8  . '%-->' . $pg_8  . '
    <!--%' . $bt_9  . '%-->' . $pg_9  . '<!--%' . $bt_10 . '%-->' . $pg_10 . '
    <!--%' . $bt_11 . '%-->' . $pg_11 . '<!--%' . $bt_12 . '%-->' . $pg_12 . '
    <!--%' . $bt_13 . '%-->' . $pg_13 . '
    ');
    
    $products_description = TELIKO_MENOU_SYNDROMITWN;
    
    ?>
    
    <?php 
          require(DIR_WS_MODULES . 'metavlites_yposystimatos_epanelegxou.php');
    ?>
    ####################################################################################################___



    The above page is using this :

    ##################################################__
    Code:
    <?php
    
    
    // QUERY "START TEXT" - Use variable $start_text for the main button content
    
    $start_text_query  = "
                            SELECT am_page_html_text
                            FROM ".TABLE_AM_PAGES."
                            WHERE am_page_menu_group = 200
                         ";
    
    $start_text_result = $db->Execute($start_text_query);
    $start_text = $start_text_result->fields['am_page_html_text'];
    
    
    
    // QUERY 1 - Use variables : $bt_1 as Button 1 title and $pg_1 as Page 1 content
    
    $button_1_query  = "
                          SELECT am_page_button_title, am_page_html_text
                          FROM ".TABLE_AM_PAGES."
                          WHERE am_page_id = 1 AND am_page_status_id = 1
                       ";
    
    $button_1_result = $db->Execute($button_1_query);
    $bt_1 = $button_1_result->fields['am_page_button_title'];
    $pg_1 = $button_1_result->fields['am_page_html_text'];
    
    
    
    
    
    
    // QUERY 2 - Use variables : $bt_2 as Button 2 title and $pg_2 as Page 2 content
    
    $button_2_query  = "
                          SELECT am_page_button_title, am_page_html_text
                          FROM ".TABLE_AM_PAGES."
                          WHERE am_page_id = 2 AND am_page_status_id = 1
                       ";
    
    $button_2_result = $db->Execute($button_2_query);
    $bt_2 = $button_2_result->fields['am_page_button_title'];
    $pg_2 = $button_2_result->fields['am_page_html_text'];
    
    ...................
    .......................
    ##############################################################################################################____



    This is a custom login sidebox :
    Code:
    <?php
    
    //require(DIR_WS_CLASSES . 'currencies.php');
    //$currencies = new currencies();
    
    
    $vres_to_synolo_agorwn = "select c.customers_id, sum(op.products_quantity * op.final_price)+sum(op.onetime_charges)  
                              as poso from " . TABLE_CUSTOMERS . " c, 
                                           " . TABLE_ORDERS_PRODUCTS . " op, 
                                           " . TABLE_ORDERS . " o 
                              where  o.customers_id = '" . $customer_id . "'
                              and o.orders_id = op.orders_id 
                              group by c.customers_id ";
    
    $synolo_agorwn = $db->Execute($vres_to_synolo_agorwn);
    $poso_syndromiti = $currencies->format($synolo_agorwn->fields['poso']);
    define("TELPOSO", '' . $poso_syndromiti . '');
    
    
    $content = "<!--testloginbox-->";
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
    
    if(!$_SESSION['customer_id']) {
    
       $content .=zen_draw_form('login_box', zen_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
       $content .=LOGIN_BOX_EMAIL_ADDRESS . '<br />' . zen_draw_input_field('email_address', '', 'size="24"').'<br />';
       $content .=LOGIN_BOX_PASSWORD . '<br />' . zen_draw_password_field('password', '', 'size="24"') . '<br />';
       $content .=''.zen_image_submit(BUTTON_IMAGE_LOGIN, BUTTON_LOGIN_ALT).'<br />';
       $content .='<a href="' . zen_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . LOGIN_BOX_PASSWORD_FORGOTTEN . '</a>' . '<br />';
       $content .='<a href="' . zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '"><b>Εγγραφή νέου χρήστη</b></a><br />';
       $content .='<a href="http://www.doctorbet.gr/gr/index.php"><b>ΑΡΧΙΚΗ ΣΕΛΙΔΑ</b></a><br />';
       $content .='</form>';
    
    }  else {
       
       $content .= '<ul>';
       $content .= '<b>' . ESYN . ' ' . OSYN . '</b><br />';
       $content .= '<b>ID Συνδρομητή : ' . CUSTIDS . '</b><br /><br />';
       $content .= '<li><a href="http://www.doctorbet.gr/gr/index.php?main_page=page&id=6&chapter=0">Οδηγίες Χρήσης</a></li>';
       $content .= '<li><a href="http://www.doctorbet.gr/gr/index.php?main_page=account_history">ΜΕΝΟΥ ΣΥΝΔΡΟΜΗΤΩΝ</a></li>';
       $content .= '<li><a href="http://www.doctorbet.gr/gr/index.php?main_page=menu001">ΝΕΟ ΜΕΝΟΥ</a></li>';
       $content .= '<li><a href="http://www.doctorbet.gr/gr/index.php?main_page=shopping_cart">Επιλεγμένες Συνδρομές</a></li>';
          $content .= '<b>Αγορές : ' . TELPOSO . '</b>';
       $content .= '</ul>';
    }
    
    $content .= '</div>';
    
    ?>
    ####################################################################################################_


    This is the tpl_account_history_default : modified too !!!

    Code:
    <div class="centerColumn" id="accountHistoryDefault">
    
    <h1 id="accountHistoryDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
    
    <?php
      if ($accountHasHistory === true) {
        foreach ($accountHistory as $history) {
    ?>
    <fieldset>
    <legend><?php echo TEXT_ORDER_NUMBER . $history['orders_id']; ?></legend>
    
    <br class="clearBoth" />
    
        <div class="content">
        <?php echo "Πατήστε "?>
        <?php echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '"><strong>Ε Δ Ω</strong></a>'; ?>
        <?php echo "για να δείτε το Μενού Συνδρομητών"?>
        </div><br>
        <div class="content back"><?php echo '<strong>Ημερομηνία Έναρξης Συνδρομής:</strong> ' . zen_date_long($history['date_purchased']); ?></div><br><br>
        <div class="content"><?php echo '<strong>Κόστος Συνδρομής:</strong> ' . strip_tags($history['order_total']); ?></div>
        
    <br class="clearBoth" />
    </fieldset>
    <?php
        }
    ?>
    <<div class="centerColumn" id="noAcctHistoryDefault">
    <?php echo TEXT_NO_PURCHASES; ?>
    </div>
    <?php
      }
    ?>
    
    </div>
    ####################################################################################################__


    This is the template for a new custom page :

    Code:
    <b><?php 
    define('MS001HEADING_ORDER_DATE', 'Η Αγορά της Συνδρομής σας έγινε :');
    
    
    echo MS001HEADING_ORDER_DATE . ' ' . zen_date_long($order->info['date_purchased']); ?></b>
    
    <?php
          if (DOWNLOAD_ENABLED == 'true') require($template->get_template_dir('tpl_modules_downloads_kouponi.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_downloads_kouponi.php');
    ?>
    ############################################################____

    You can see above that we are loading a different tpl_modules page

    We use one tpl_module_download for every page, to control the content

    We first load this tpl_modules_download and then we check if content is available for the subscriber, so we include the content through this tpl_module_download.



    Works perfect for my client !!!!!!!

    There are many many changes and modifications, and also many settings in admin area that I do not remember right now.

    This is because I have not been able in this forum to make a team and work together.

    Unfortunatelly

    If anyone want a subscription system, he can hire me

    [email protected]

    www.lebrand.gr

  6. #6
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

    Default Re: Subscription System

    Will this module work if you sell regular products but also want customers to be able to subscribe to watch videos? Can you have both regular products and a subscription section?
    Danielle

 

 

Similar Threads

  1. Subscription System and Auto Menu Pages
    By cjsmiff in forum Addon Payment Modules
    Replies: 0
    Last Post: 26 Sep 2007, 01:38 AM
  2. Subscription System for 1.3.7 - Subscription Product
    By lebrand2006 in forum Addon Templates
    Replies: 1
    Last Post: 27 Apr 2007, 10:57 AM
  3. Subscription System
    By lebrand2006 in forum General Questions
    Replies: 0
    Last Post: 14 Mar 2007, 09:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg