Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

YePix

Members
  • Content count

    419
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by YePix

  1. YePix

    Adding a telephone field to the contact form

    if (tep_validate_email($email_address)) { Checks whether the specified email address was entered correctly. You find this in: catalog/includes/functions/validations.php try it with that: if (empty($_POST[" telephone "])) { phoneErr = "phone is required"; } else { $ telephone = tep_db_prepare_input($_POST[' telephone ']); }
  2. YePix

    Adding a telephone field to the contact form

    try it like this catalog/includes/form_check.js.php Finde: Find: check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>"); Füge danach inzu: Add after: check_input("phone", <?php echo ENTRY_PHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_PHONE_ERROR; ?>"); catalog/includes/languages/"your_language_file".php Finde: Find: define('ENTRY_EMAIL_ADDRESS_ERROR', 'Your E-Mail Address must contain a minimum of ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.'); Füge danach inzu: Add after: define('ENTRY_PHONE_MIN_LENGTH', '5'); define('ENTRY_PHONE_ERROR', 'Your phonenumber must contain a minimum of ' . ENTRY_PHONE_MIN_LENGTH . ' characters.');
  3. YePix

    Adding a telephone field to the contact form

    maybe that's it if (empty($_POST["phone"])) { phoneErr = "phone is required"; } else { $phone = tep_db_prepare_input($_POST['phone']); } <td class="main"><?php echo tep_draw_input_field('phone '); ?><?php echo phoneErr;?></td>
  4. YePix

    New V2 Forum

    The 2.xx forum is now available at a new address View forum here
  5. YePix

    Adding a telephone field to the contact form

    Try this <?php /* $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $ 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_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $secret = '6LfjSr4UAAAAAKlThMtas78PrxscmSpZoHeRcs_D'; $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => 'https://www.google.com/recaptcha/api/siteverify', CURLOPT_POST => true, CURLOPT_POSTFIELDS => array( 'secret' => $secret, 'response' => $HTTP_POST_VARS['g-recaptcha-response'], 'remoteip' => $_SERVER['REMOTE_ADDR'] ), CURLOPT_RETURNTRANSFER => true )); $verifyResponse = curl_exec($ch); curl_close($ch); $responseData = json_decode($verifyResponse); if($responseData->success){ $name = tep_db_prepare_input(ucwords($_POST['name'])); $email_address = tep_db_prepare_input($_POST['email']); $phone = tep_db_prepare_input($_POST['phone']); $subject = tep_db_prepare_input(ucwords($_POST['subject'])); $enquiry = tep_db_prepare_input(ucwords($_POST['enquiry'])); $text = ENTRY_NAME . ' ' . $name . "\n" . ENTRY_TELEPHONE_NUMBER . ' ' . $phone . "\n" . ENTRY_EMAIL . ' ' . $email_address . "\n" . ENTRY_ENQUIRY . "\n" . $enquiry; if (tep_validate_email($email_address)) { if (strpos($enquiry, "href") > 1) { }else { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $text, $name, STORE_OWNER_EMAIL_ADDRESS, $phone); } tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } }else{ $error = true; $messageStack->add('contact', 'Robot verification failed, please try again.'); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? 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 //--> <style type="text/javascript"> .terms-conditions{font-size: 13px;} </style> <!-- 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"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><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> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_wave.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { ?> <!-- start mod anagram --> <tr> <td class="main"><STRONG><?php echo nl2br(STORE_NAME_ADDRESS); ?></STRONG><br><br></td> </tr> <!-- end mod anagram --> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NAME; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('phone'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td> </tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="terms-conditions"> <p style="font-size:12px"> <input type="checkbox" id="privacypolicy" /> Please confirm you consent to the storage and handling of your data by this website in order to answer your enquiry or to supply you with the information you require.</p> <p style="font-size:12px">If you don't wish to give consent then please call us on 01903 700778 with your query.</p> <p style="font-size:12px">We won't receive this form unless you give consent.</p> <p style="font-size:12px">Please see our <a href="/privacy.php" style="color: red; text-decoration: none; font-weight: bold;" target="_blank">Privacy and Data Policy</a> for details of what we do with your supplied infomation.</p> <style> .required{ color:red; } .g-recaptcha div { margin: auto; } </style> <script type="text/javascript" src='https://www.google.com/recaptcha/api.js'></script> <div id="g-recaptcha" class="g-recaptcha" data-sitekey="6LfjSr4UAAAAAMuhHo-vC9tx0TVUn68igMlQpzyc"></div> <div id="msgcaptcha" class="g-recaptcha error" style="color: red;"></div> <br/> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right "> <img style="float: right;" src="/includes/languages/english/images/buttons/button_continue.gif" onclick="myFunction()" /> <input style="display:none" id="myDIV" style="float: right;" src="includes/languages/english/images/buttons/button_continue.gif" alt="Continue" title=" Continue " type="image" border="0"> <?php //echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <script type="text/javascript"> function myFunction() { if (document.getElementById("privacypolicy").checked == true) { var x = document.getElementsByName("contact_us"); var recaptcha = document.getElementById("g-recaptcha-response").value; if (recaptcha === "") { document.getElementById("msgcaptcha").innerHTML = "Please check the recaptcha"; return false; } x[0].submit(); } else { alert("Please confirm you consent to the storage and handling of your data by this website in order to answer your enquiry or to supply you with the information you require."); } } </script> <?php } ?> </table></form></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'); ?>
  6. YePix

    Adding a telephone field to the contact form

    Change telephone to phone or vice versa and everything will work. It is important that the variables match or send me the complete contact_us.php. I don't think you'll get any support here for 2.2.
  7. YePix

    Adding a telephone field to the contact form

    $name = tep_db_prepare_input(ucwords($_POST['name'])); $email_address = tep_db_prepare_input($_POST['email']); $phone = tep_db_prepare_input($_POST['phone']); $subject = tep_db_prepare_input(ucwords($_POST['subject'])); $enquiry = tep_db_prepare_input(ucwords($_POST['enquiry'])); $text = ENTRY_NAME . ' ' . $name . "\n" . ENTRY_TELEPHONE_NUMBER . ' ' . $phone . "\n" . ENTRY_EMAIL . ' ' . $email_address . "\n\n" . BOX_HEADING_SUBJECT . ' ' . $subject . "\n" . ENTRY_ENQUIRY . "\n" . $enquiry; tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $text, $name, STORE_OWNER_EMAIL_ADDRESS, $phone); <tr> <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('phone'); ?></td> </tr>
  8. YePix

    addons for old versions

    You won't find them there either.
  9. YePix

    New V2 Forum

    What do you mean by billing program
  10. YePix

    New V2 Forum

    The support forum for the old 2.xx versions is online. If anyone is interested, simply register and post their concerns. I am convinced that there is no longer any support for the older versions. https://yepix.de/forum/index.php
  11. if someone uses the module get 1 free, here is a customer info. List of products with gifts offered in the shop. Just install it where you want it. <?php if (defined('MODULE_CONTENT_PRODUCT_INFO_GET_1_FREE_STATUS') && (MODULE_CONTENT_PRODUCT_INFO_GET_1_FREE_STATUS == 'True') ) { $check_get_1_free = tep_db_query("select gf.get_1_free_id from get_1_free gf, products p where gf.products_id = p.products_id"); if (tep_db_num_rows($check_get_1_free)) { ?> <div class="clearfix"></div><hr class="hr-gr mb-2 mt-2"> <div class="mb-2 mt-2 w3-large"><font color="#DD0000"><b><?php echo DISCOUNT_PAGE_MODULE_CONTENT_PRODUCT_INFO_GET_1_FREE_TITLE;?></b></font></div> <?php $products_cart_gift = '<img src="images/cart_gift.png">'; $get_1_free_product_query = tep_db_query("select gf.get_1_free_id, gf.products_id, gf.products_qualify_quantity, gf.products_free_quantity, pd.products_name from get_1_free gf, products p left join products_description pd on p.products_id = pd.products_id where gf.products_id = p.products_id order by gf.get_1_free_id"); while ($get_1_free_product = tep_db_fetch_array($get_1_free_product_query)){ $get_1_free_query = tep_db_query("select gf.products_free_id, p.products_id, pd.products_name from get_1_free gf, products p left join products_description pd on p.products_id = pd.products_id where gf.get_1_free_id = '" . $get_1_free_product['get_1_free_id'] . "' and p.products_id = gf.products_free_id order by gf.get_1_free_id"); if (tep_db_num_rows($get_1_free_query)) { while ($get_1_free = tep_db_fetch_array($get_1_free_query)){ $g1f = $get_1_free['products_name']; $g1f_pfid = $get_1_free['products_free_id']; } if ($get_1_free_product['products_qualify_quantity'] > 1){$pquqt = DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_FOUR;}else{$pquqt = '';} ?> <div class="mb-2 mt-2 w3-border w3-border-blue w3-leftbar w3-round w3-padding"> <?php echo $products_cart_gift . ' ' . $get_1_free_product['products_qualify_quantity'] . ' ' . $pquqt;?> <a href="<?php echo tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $get_1_free_product['products_id']); ?>"><b class="w3-text-black w3-hover-text-blue"><?php echo $get_1_free_product['products_name'];?></b></a> <?php echo DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_TWO . ' ' . $get_1_free_product['products_free_quantity'];?> <a href="<?php echo tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . $g1f_pfid); ?>"><b class="w3-text-blue w3-hover-text-black"><?php echo $g1f;?></b></a> <?php echo DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_THREE;?> </div> <?php }}}}?> language: define('DISCOUNT_PAGE_MODULE_CONTENT_PRODUCT_INFO_GET_1_FREE_TITLE', 'Geschänkartikel'); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION', '<font color="#990000">ANGEBOT:</font>'); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_TWO', 'kaufen und Sie bekommen von uns '); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_THREE', 'dazu geschenkt.'); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_PROMOTION_FOUR', 'identische'); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_ATTRIBUTE_PROMOTION', '<font color="#990000">ACHTUNG!</font> Bei diesem Angebot müssen die'); define('DISCOUNT_PAGE_TEXT_GET_1_FREE_ATTRIBUTE_PROMOTION_TWO', 'im Warenkorb identisch sein'); define('DISCOUNT_PAGE_TEXT_OFFER_ENDS', ' - Zeitlich begrenztes Angebot endet');
  12. YePix

    New V2 Forum

    Yes. I'll be right there
  13. And do you still think so?
  14. This post is only for users of the following version: https://forums.oscommerce.com/topic/497129-w3-oscommerce-wip/ If someone runs the standard version and is interested in a corresponding solution, just let me know. ############################################################################# Anyone who has installed the master password and uses the following settings: -- phpMyAdmin SQL Dump -- version 5.1.3 -- -- Server-Version: 8.0.29 -- PHP-Version: 7.4.28 should check if it still works. if not, 3 changes are necessary in the database and the following files. in the database (configuration) delete: MASTER_PASS_UPD further in (configuration) configuration_key = MASTER_PASS change configuration_group_id to '6' import the following sql: CREATE TABLE `master_pass` ( `pass_id` int NOT NULL, `master_password` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; INSERT INTO `master_pass` (`pass_id`, `master_password`) VALUES (1, '$P$DUtaalZRAg5bys3.I/flCi4YeQ3TNI0'); catalog/admin/master_password.php <?php require('includes/application_top.php'); require('includes/functions/' . 'password_funcs.php'); $action = (isset($_GET['action']) ? $_GET['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'save': if (isset($_GET['mPID'])) $pass_id = tep_db_prepare_input($_GET['mPID']); $master_password = tep_db_prepare_input($_POST['master_password']); $sql_data_array = array( 'master_password' => tep_encrypt_password($master_password)); if ($action == 'save') { $sql_data_array = $sql_data_array; if (empty($master_password)){ function gennewPassword ( $passwordlength = 8, $numNonAlpha = 0, $numNumberChars = 0, $useCapitalLetter = false ) { $numberChars = '123456789'; $specialChars = '!$%&=?*-:;.,+~@_'; $secureChars = 'abcdefghjkmnpqrstuvwxyz'; $stack = ''; $stack = $secureChars; if ( $useCapitalLetter == true ) $stack .= strtoupper ( $secureChars ); $count = $passwordlength - $numNonAlpha - $numNumberChars; $temp = str_shuffle ( $stack ); $stack = substr ( $temp , 0 , $count ); if ( $numNonAlpha > 0 ) { $temp = str_shuffle ( $specialChars ); $stack .= substr ( $temp , 0 , $numNonAlpha ); } if ( $numNumberChars > 0 ) { $temp = str_shuffle ( $numberChars ); $stack .= substr ( $temp , 0 , $numNumberChars ); } $stack = str_shuffle ( $stack ); return $stack; } $passwd = gennewPassword ( 8, 2, 2, true ); tep_db_query("update master_pass set master_password = '" . tep_encrypt_password($passwd) . "' where pass_id = '" . (int)$pass_id . "'"); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_encrypt_password($passwd) . "' where configuration_key = 'MASTER_PASS'"); }else{ tep_db_perform('master_pass', $sql_data_array, 'update', "pass_id = '" . (int)$pass_id . "'"); tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_encrypt_password($master_password) . "' where configuration_key = 'MASTER_PASS'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('pass_labels'); } tep_redirect(tep_href_link('master_password.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'mPID=' . $pass_id)); break; } } require('includes/template_top.php'); ?> <div class="w3-padding"> <h1 class="pageHeading"><?php echo MASTER_PASSWORT_HEADING_TITLE; ?></h1> <div class="d-flex flex-column flex-sm-row mb-3"> <div class="flex-grow-1"> <table class="w3-table w3-border w3-bordered w3-hoverable"> <thead class="w3-hover-none"> <tr class="w3-theme"> <th scope="col"><?php echo MASTER_PASSWORT_HEADING_TITLE; ?></th> </tr> </thead> <tbody> <?php $masterpass_query_raw = "select pass_id, master_password from master_pass order by pass_id"; $masterpass_query = tep_db_query($masterpass_query_raw); while ($masterpass = tep_db_fetch_array($masterpass_query)) { $masterpass_id = $masterpass['pass_id']; if ((!isset($_GET['mPID']) || (isset($_GET['mPID']) && ($_GET['mPID'] == $masterpass['pass_id']))) && !isset($mpInfo) && (substr($action, 0, 3) != 'new')) { $mpInfo = new objectInfo($masterpass); } if (isset($mpInfo) && is_object($mpInfo) && ($masterpass['pass_id'] == $mpInfo->pass_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('master_password.php', '&mPID=' . $masterpass['pass_id'] . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('master_password.php', '&mPID=' . $masterpass['pass_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent">&nbsp;<?php echo MASTER_PASSWORT_TEXT_SECURE; ?></td> </tr> <?php } ?> </tbody> </table> </div> <?php $heading = ''; $contents = ''; switch ($action) { case 'edit': $heading = MASTER_PASSWORT_HEADING_TITLE . '&nbsp;' . TEXT_MASTER_PASSWORT_TITLE_EDIT; $contents = tep_draw_form('pass_labels', 'master_password.php', '&mPID=' . $mpInfo->pass_id . '&action=save', 'post', 'enctype="multipart/form-data"'); $contents .= '<tr><td>' . MASTER_PASSWORT_TEXT_EDIT_INTRO; $contents .= '<div class="mt-2 mb-3">' . tep_draw_input_field('master_password', '', 'required aria-required="true" class="w3-input w3-border"') . '</div>'; $contents .= '<hr class="hr-gr mt-2 mb-2"><div class="mb-3 mt-3">' . tep_draw_w3_button(IMAGE_SAVE, 'disk', null, 'primary', null, 'class="w3-button w3-large w3-block w3-teal"') . '</div><div class="mb-3">' . tep_draw_w3_button(IMAGE_CANCEL, 'close', tep_href_link('master_password.php', '&mPID=' . $mpInfo->pass_id), null, null, 'class="w3-button w3-large w3-block w3-theme-light"') . '</div>'; $contents .= '</td></tr>'; $contents .= '</form>'; break; default: if (isset($mpInfo) && is_object($mpInfo)) { // $heading[] = array('align' => 'center', 'text' => '&nbsp;<strong>' . $mpInfo->master_password . '</strong>'); $heading = TEXT_MASTER_PASSWORT_TITLE_EDIT; $contents = '<tr><td>' . tep_draw_w3_button(IMAGE_EDIT, 'document', tep_href_link('master_password.php', '&mPID=' . $mpInfo->pass_id . '&action=edit'), null, null, 'class="w3-button w3-large w3-block w3-black mb-3"'); $contents .= '<div class="clearfix"></div>'; $contents .= '</td></tr>'; } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo '<div class="w3-quarter ms-sm-2">' . "\n" . ' <table class="w3-table w3-border w3-border-black w3-light-gray">' . ' <thead>' . ' <tr class="w3-theme">' . ' <th scope="col">'. $heading . '</th>' . ' </tr>' . ' </thead>' . ' <tbody>' . $contents . '</tbody>' . ' </table>' . '</div>' . "\n"; } ?> </div> </div> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?> catalog/admin/includes/languages/master_password.php <?php define('MASTER_PASSWORT_HEADING_TITLE', 'Masterpasswort'); define('TEXT_MASTER_PASSWORT_TITLE_EDIT', 'bearbeiten'); define('MASTER_PASSWORT_TEXT_SECURE', '** Passwort verschlüsselt **'); define('MASTER_PASSWORT_TEXT_EDIT_INTRO', 'Vergeben Sie hier das neue Masterpasswort, mit dem Sie sich, über die Shopseite, in jedes Kundenkonto einloggen können.'); ?> catalog/admin/includes/boxes/configuration.php array( 'code' => 'master_password.php', 'title' => BOX_CONFIGURATION_MASTER_PASSWORD, 'link' => tep_href_link('master_password.php') ), catalog/admin/includes/languages/german.php - or your file define('BOX_CONFIGURATION_MASTER_PASSWORD', 'Masterpasswort'); delete: catalog/admin/includes/sew_actions/encrypt_var.php catalog/admin/includes/boxes/master_password.php catalog/admin/includes/languages/modules/boxes/master_password.php
  15. YePix

    Help with SQL

    $products_query = tep_db_query("SELECT op.products_model, op.orders_id, op.products_quantity, opa.orders_id, opa.products_options_values FROM
  16. How do you mean ? example would be helpful
  17. find: <td class="dataTableHeadingContent" align="center"><?php echo 'count'; ?></td> change to: <td class="dataTableHeadingContent" align="center"><?php if (!$_GET['cPath']){ echo 'count';} ?></td>
  18. find: <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td> </tr> <?php } change to: <td class="dataTableContent" align="right"></td> <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td> </tr> <?php }
  19. for all products with deactivated category to find: $cInfo = new objectInfo($cInfo_array); change to: $cInfo = new objectInfo($cInfo_array); $products_count_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$categories['categories_id'] . "'"); $products_count = tep_db_fetch_array($products_count_query); $p_count = $products_count['total']; find: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<strong>' . $categories['categories_name'] . '</strong>'; ?></td> change to: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <strong>' . $categories['categories_name'] . ' / ' . $p_count . '</strong>'; ?></td>
  20. find: <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> change to: <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo 'count'; ?></td> find: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<strong>' . $categories['categories_name'] . '</strong>'; ?></td> <td class="dataTableContent" align="center">&nbsp;</td> change to: <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;<strong>' . $categories['categories_name'] . '</strong>'; ?></td> <td class="dataTableContent" align="center">&nbsp;</td> <td class="dataTableContent" align="center"><?php echo tep_products_in_category_count($categories['categories_id']);?></td>
  21. New Module for reminder of rating. catalog/includes/languages/xxx/modules/content/index/cm_i_customer_reviews_info.php <?php define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_TITLE', 'Bewertungserinnerung'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_DESCRIPTION', 'Fügt eine Infobox für Bewertungserinnerung an Kunden in Ihrer Website ein.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_HEADING_TITLE', 'Ihre Meinung ist uns wichtig'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO', 'Hallo'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MR', 'Sehr geehrter Herr'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MRS', 'Sehr geehrte Frau'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FIRST', 'Es freut und sehr, denn Sie haben bereits '); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO', 'Produkte erworben und davon'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO_ONE', 'leider'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_THREE', 'bewertet.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FOUR', 'Es ist uns sehr wichtig, unsere Qualität, Geschmack und Leistung auch anderen Kunden und Besuchern nahe zu bringen. Der bester Weg ist somit, durch Ihre Erfahrung.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIRST', 'Ihr letzter Einkauf war am'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_TWO', 'ist länger als'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_THREE', 'Tage her.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FOUR', 'Es ist uns sehr wichtig, unsere Qualität, Geschmack und Leistung auch anderen Kunden und Besuchern nahe zu bringen. Der bester Weg ist somit, durch Ihre Erfahrung.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE', 'Aus diesem Grund, würden wir uns über'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE_ONE', ' Bewertung, von Ihnen, sehr freuen.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE_TWO', 'Bewertungen, von Ihnen, sehr freuen.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_SIX', 'Aus diesem Grund, würden wir uns über eine Bewertung, für die restlichen von Ihnen erworbenen Produkte, sehr freuen.'); define('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_BUTTON_FOR_REVIEWS', 'zu den Produktbewertungen'); ?> catalog/includes/modules/content/index/cm_i_customer_reviews_info.php <?php class cm_i_customer_reviews_info { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_TITLE; $this->description = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_DESCRIPTION; if ( defined('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_STATUS') ) { $this->sort_order = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_SORT_ORDER; $this->enabled = (MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_STATUS == 'True'); } } function execute() { global $oscTemplate, $customer_id, $languages_id, $name, $lastname, $gender, $nullcount ; $name = tep_customers_first_name($customer_id); $lastname = tep_customers_last_name($customer_id); $gender = tep_customers_gender($customer_id); ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Bewertungserinnerung freischalten:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_STATUS', 'True', 'Mchten Sie das Modul für Bewertungserinnerung freischalten?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('--------------------------------------------------<br>Produktanzahl frei schalten:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_OPEN_PRODUCTS_FOR_REMEMBER', 'Produktanzahl', 'Mchten Sie, dass die Erinnerung nach Produktanzahl oder Datum eingeblendet werden soll?', '6', '1', 'tep_cfg_select_option(array(\'Produktanzahl\', \'Datum\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Produktanzahl:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_FOR_REMEMBER', '25', 'Anzahl der Produkte ab der die Erinnerung eingeblendet werden soll.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Tagesanzahl:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATE_FOR_REMEMBER', '5', 'Anzahl der Tage nach dem letzten Kauf ab der die Erinnerung eingeblendet werden soll.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('--------------------------------------------------<br>Mindestbewertungen:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN', '7', 'Anzahl der Mindestbewertungen die der Kunde schreiben muss bevor die Erinnerung nicht mehr eingeblendet wird. Bleibt das Feld leer wird die Mindestanzahl aus gekauften Produkten minus Mindestprodukte gerechnet..', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('--------------------------------------------------<br>Sort Order:', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_SORT_ORDER', '10', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_STATUS', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_OPEN_PRODUCTS_FOR_REMEMBER', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_FOR_REMEMBER', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATE_FOR_REMEMBER', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN', 'MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MESAGE_SORT_ORDER'); } } catalog/includes/modules/content/index/templates/tpl_cm_i_customer_reviews_info.php <?php if (isset($_SESSION['customer_id'])){?> <?php $customer_total_prod_query = tep_db_query("select o.customers_id, o.date_purchased, op.products_name, op.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and p.products_id = op.products_id and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and p.products_status = '1' and o.orders_status = '1' and s.public_flag = '1' group by op.products_id order by o.date_purchased DESC"); if (tep_db_num_rows($customer_total_prod_query) > '0'){ $customer_all_prod_query = tep_db_query("select o.customers_id, op.products_name, op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' group by op.products_name order by op.products_name ASC"); $reviewed_count_query = tep_db_query("select count(products_id) as count from reviews where customers_id = '" . $_SESSION['customer_id'] . "'"); $reviewed_count = tep_db_fetch_array($reviewed_count_query); $count = $reviewed_count['count']; if (empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN)){$min_count = tep_db_num_rows($customer_total_prod_query) - MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_FOR_REMEMBER;} if (!empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN)){$min_count = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN - $count;} if ($count == '0'){ $nullcount = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO_ONE;} if ($min_count == '0'){ $revmincount = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_SIX;} if ($min_count == '1'){ $revmincount = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE_ONE;} if ($min_count > '1'){ $revmincount = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE_TWO;} if (MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_OPEN_PRODUCTS_FOR_REMEMBER == 'Produktanzahl'){ if ((MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_OPEN_PRODUCTS_FOR_REMEMBER == 'Produktanzahl') && (empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN))){ if (tep_db_num_rows($customer_total_prod_query) > MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_FOR_REMEMBER){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); $customer_gender_query = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); $customer_gender = tep_db_fetch_array($customer_gender_query); ?> <?php if ($customer_gender['customers_gender'] == 'm') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MR . ' ' . $lastname . ', ';}?> <?php if ($customer_gender['customers_gender'] == 'f') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MRS . ' ' . $lastname . ', ';}?> <?php if (empty($customer_gender['customers_gender'])) {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO . ' ' . $name . ', ';}?> <div class="col-sm-12 w3-padding mb-2"> <header class="w3-red w3-padding"><div class="w3-text-white w3-large"><?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_HEADING_TITLE;?></div></header> <div class="w3-border w3-bottombar w3-border-red w3-padding"> <?php echo $cu_gender . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FIRST . ' ' . tep_db_num_rows($customer_all_prod_query) . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO . ' ' . $nullcount . ' ' . $count . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_THREE . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FOUR . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE . ' ' . $min_count . ' ' . $revmincount;?> <div class="mt-3"> <a rel="preconnect" href='<?php echo tep_href_link('account.php'); ?>' class="btn btn-info btn-block w3-border w3-border-black w3-text-black w3-hover-text-white" role="button"><i class="fa fa-star w3-text-yellow w3-large" style="text-shadow: 1px 0 #fff, 0 -1px transparent, -1px 0 #fff, 0 1px #fff"></i> <?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_BUTTON_FOR_REVIEWS; ?></a> </div> <div class="clearfix"></div></div></div> <?php }}?> <?php if ((MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_OPEN_PRODUCTS_FOR_REMEMBER == 'Produktanzahl') && (!empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN))){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); $customer_gender_query = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); $customer_gender = tep_db_fetch_array($customer_gender_query); ?> <?php if ($customer_gender['customers_gender'] == 'm') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MR . ' ' . $lastname . ', ';}?> <?php if ($customer_gender['customers_gender'] == 'f') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MRS . ' ' . $lastname . ', ';}?> <?php if (empty($customer_gender['customers_gender'])) {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO . ' ' . $name . ', ';}?> <div class="col-sm-12 w3-padding mb-2"> <header class="w3-red w3-padding"><div class="w3-text-white w3-large"><?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_HEADING_TITLE;?></div></header> <div class="w3-border w3-bottombar w3-border-red w3-padding"> <?php echo $cu_gender . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FIRST . ' ' . tep_db_num_rows($customer_all_prod_query) . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO . ' ' . $nullcount . ' ' . $count . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_THREE . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FOUR . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE . ' ' . $min_count . ' ' . $revmincount;?> <div class="mt-3"> <a rel="preconnect" href='<?php echo tep_href_link('account.php'); ?>' class="btn btn-info btn-block w3-border w3-border-black w3-text-black w3-hover-text-white" role="button"><i class="fa fa-star w3-text-yellow w3-large" style="text-shadow: 1px 0 #fff, 0 -1px transparent, -1px 0 #fff, 0 1px #fff"></i> <?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_BUTTON_FOR_REVIEWS; ?></a> </div> <div class="clearfix"></div></div></div> <?php }?> <?php }else{?> <?php if (empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN)){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); $customer_purchased_date_query = tep_db_query("select date_purchased as datum from " . TABLE_ORDERS . " where customers_id = '" . $_SESSION['customer_id'] . "' order by date_purchased DESC"); $customer_purchased_date = tep_db_fetch_array($customer_purchased_date_query); $current_date = date('Y-m-d'); $purchased_date = $customer_purchased_date['datum']; $new_date = date('Y-m-d', strtotime($purchased_date . '+ ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATE_FOR_REMEMBER . ' days')); if ($current_date >= $new_date){ if (tep_db_num_rows($customer_total_prod_query) > MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_FOR_REMEMBER){ $customer_total_prod_query = tep_db_query("select o.customers_id, o.date_purchased, op.products_name, op.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and p.products_id = op.products_id and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and p.products_status = '1' and o.orders_status = '1' and s.public_flag = '1' order by o.date_purchased DESC"); if (tep_db_num_rows($customer_total_prod_query) > '0'){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); ?> <div class="col-sm-12 w3-padding mb-2"> <header class="w3-red w3-padding"><div class="w3-text-white w3-large"><?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_HEADING_TITLE;?></div></header> <div class="w3-border w3-bottombar w3-border-red w3-padding"> <?php $customer_gender_query = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); $customer_gender = tep_db_fetch_array($customer_gender_query); ?> <?php if ($customer_gender['customers_gender'] == 'm') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MR . ' ' . $lastname . ', ';}?> <?php if ($customer_gender['customers_gender'] == 'f') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MRS . ' ' . $lastname . ', ';}?> <?php if (empty($customer_gender['customers_gender'])) {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO . ' ' . $name . ', ';}?> <?php echo $cu_gender . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIRST . ' ' . tep_date_short($customer_total_prod['date_purchased']) . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FIRST . ' ' . tep_db_num_rows($customer_all_prod_query) . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO . ' ' . $nullcount . ' ' . $count . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_THREE . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FOUR . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE . ' ' . $min_count . ' ' . $revmincount; ?> <div class="mt-3"> <a rel="preconnect" href='<?php echo tep_href_link('account.php'); ?>' class="btn btn-info btn-block w3-border w3-border-black w3-text-black w3-hover-text-white" role="button"><i class="fa fa-star w3-text-yellow w3-large" style="text-shadow: 1px 0 #fff, 0 -1px transparent, -1px 0 #fff, 0 1px #fff"></i> <?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_BUTTON_FOR_REVIEWS; ?></a> </div> <div class="clearfix"></div></div></div> <?php }}}?> <?php }?> <?php if (!empty(MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_PRODUCTS_MIN)){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); $customer_purchased_date_query = tep_db_query("select date_purchased as datum from " . TABLE_ORDERS . " where customers_id = '" . $_SESSION['customer_id'] . "' order by date_purchased DESC"); $customer_purchased_date = tep_db_fetch_array($customer_purchased_date_query); $current_date = date('Y-m-d'); $purchased_date = $customer_purchased_date['datum']; $new_date = date('Y-m-d', strtotime($purchased_date . '+ ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATE_FOR_REMEMBER . ' days')); if ($current_date >= $new_date){ $customer_total_prod_query = tep_db_query("select o.customers_id, o.date_purchased, op.products_name, op.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and p.products_id = op.products_id and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and p.products_status = '1' and o.orders_status = '1' and s.public_flag = '1' order by o.date_purchased DESC"); if (tep_db_num_rows($customer_total_prod_query) > '0'){ $customer_total_prod = tep_db_fetch_array($customer_total_prod_query); ?> <div class="col-sm-12 w3-padding mb-2"> <header class="w3-red w3-padding"><div class="w3-text-white w3-large"><?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_HEADING_TITLE;?></div></header> <div class="w3-border w3-bottombar w3-border-red w3-padding"> <?php $customer_gender_query = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); $customer_gender = tep_db_fetch_array($customer_gender_query); ?> <?php if ($customer_gender['customers_gender'] == 'm') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MR . ' ' . $lastname . ', ';}?> <?php if ($customer_gender['customers_gender'] == 'f') {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_MRS . ' ' . $lastname . ', ';}?> <?php if (empty($customer_gender['customers_gender'])) {$cu_gender = MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO . ' ' . $name . ', ';}?> <?php echo $cu_gender . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIRST . ' ' . tep_date_short($customer_total_prod['date_purchased']) . '.<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_FIRST . ' ' . tep_db_num_rows($customer_all_prod_query) . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_TWO . ' ' . $nullcount . ' ' . $count . ' ' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_TO_CUSTOMER_THREE . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FOUR . '<br>' . MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_DATA_TO_CUSTOMER_FIVE . ' ' . $min_count . ' ' . $revmincount; ?> <div class="mt-3"> <a rel="preconnect" href='<?php echo tep_href_link('account.php'); ?>' class="btn btn-info btn-block w3-border w3-border-black w3-text-black w3-hover-text-white" role="button"><i class="fa fa-star w3-text-yellow w3-large" style="text-shadow: 1px 0 #fff, 0 -1px transparent, -1px 0 #fff, 0 1px #fff"></i> <?php echo MODULE_CONTENT_I_CUSTOMER_REVIEWS_INFO_BUTTON_FOR_REVIEWS; ?></a> </div> <div class="clearfix"></div></div></div> <?php }}}?> <?php }?> <?php }}?> catalog/includes/functions/general.php before the last ?> function tep_customers_gender($customers_id) { $customers = tep_db_query("select customers_gender from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); $customers_values = tep_db_fetch_array($customers); if (isset($customers_values['customers_gender']) == 'm') { $gender_output = MALE; } elseif (isset($customers_values['customers_gender']) == 'f') { $gender_output = FEMALE; } else { $gender_output = ''; } return $gender_output; } function tep_customers_first_name($customers_id) { $customers = tep_db_query("select customers_firstname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); $customers_values = tep_db_fetch_array($customers); if (isset($customers_values['customers_firstname'])){ return $customers_values['customers_firstname']; } } function tep_customers_last_name($customers_id) { $customers = tep_db_query("select customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'"); $customers_values = tep_db_fetch_array($customers); if (isset($customers_values['customers_lastname'])){ return $customers_values['customers_lastname']; } } catalog/includes/languages/xxx.php define('MALE', 'Herr'); define('FEMALE', 'Frau'); Only in German.
  22. YePix

    Forgot admin username and password

    You can change the corresponding values via the database Passwort: $P$DOJTNuN7agxLBq9xCn9cXZfLZ0M7eo0 Passwort = admin
  23. Product rating for products already purchased Here customers can see all the products they have already purchased, which can be rated with just one click. All products that have already been rated are then displayed below. catalog/includes/languages/xxx/account.php define('MY_ACCOUNT_PRODUCTS_REVIEWED', 'Bereits bewertete Produkte'); define('MY_ACCOUNT_REVIEW_NOW_PRODUCTS', 'Offen stehende Bewertungen'); define('MY_ACCOUNT_REVIEW_PRODUCTS_LG_MD', 'Jetzt bewerten'); define('MY_ACCOUNT_REVIEW_PRODUCTS_SM_XS', ''); define('MY_ACCOUNT_REVIEW_PRODUCTS_TODAY_NO_AVALIABLE_HEADER_INFO', 'Alle Produkte, markiert mit <span class="w3-border w3-border-red w3-white w3-padding-small"><i class="fa fa-minus-circle w3-text-red"></i></span>, sind heute nicht verfügbar.'); catalog/account.php <?php $customer_total_prod_query = tep_db_query("select o.customers_id, op.products_name, op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' group by op.products_name order by op.products_name ASC"); if (tep_db_num_rows($customer_total_prod_query) > 0) { ?> <header class="w3-camo-forest w3-padding w3-xlarge"><?php echo MY_ACCOUNT_REVIEW_NOW_PRODUCTS;?></header> <div class="w3-border mb-4"><div class="clearfix"></div><hr class="hr-trans mb-1 mt-2"> <div class="w3-padding"><div class="w3-border w3-border-red w3-padding mb-2 w3-text-red w3-pale-red"><?php echo MY_ACCOUNT_REVIEW_PRODUCTS_TODAY_NO_AVALIABLE_HEADER_INFO;?></div><div class="clearfix"></div><hr class="hr-gr mb-1 mt-1"></div> <?php $query_allready_rows = ''; $customer_reviews_query = tep_db_query("select o.customers_id, op.products_name, op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' group by op.products_name order by op.products_name ASC"); while ($customer_reviews = tep_db_fetch_array($customer_reviews_query)){ $query_allready_rows++; if (strlen($query_allready_rows) < 1) { $query_allready_rows = '0' . $query_allready_rows; } $products_revd_status_query = tep_db_query("select products_status from products where products_id = '" . $customer_reviews['products_id'] . "'"); $products_revd_status = tep_db_fetch_array($products_revd_status_query); $query_allready = tep_db_query("select reviews_id from reviews where products_id = '" . (int)$customer_reviews['products_id'] . "' AND customers_id = '" . (int)$_SESSION['customer_id'] . "'"); if (tep_db_num_rows($query_allready) > 0) { $error = true; }else{ ?> <div class="col-sm-6"> <?php $printlist_category_query = tep_db_query("select c.categories_id, c.categories_product_qty, c.category_stock_status, c.category_stock_info_status, c.cat_stock_att_image, cd.categories_id, cd.categories_name, cd.categories_stock, cd.categories_stock_alternatively, cd.categories_stock_replacement from products p, categories c, categories_description cd, products_to_categories pc where p.products_id = '" . $customer_reviews['products_id'] . "' and p.products_id = pc.products_id and pc.categories_id = cd.categories_id and cd.categories_id = c.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $printlist_category = tep_db_fetch_array($printlist_category_query); ?> <?php if ($products_revd_status['products_status'] == '1'){?> <div class="mb-1 mt-1 w3-padding w3-border w3-border-red w3-sand"> <?php }else{?> <div class="mb-1 mt-1 w3-padding w3-border w3-border-red w3-pale-red"> <?php } if ($products_revd_status['products_status'] == '1'){?> <a rel="preconnect" itemprop="url" href="<?php echo tep_href_link('product_info.php', 'products_id=' . $customer_reviews['products_id']); ?>"><?php echo $query_allready_rows . ' ' . $customer_reviews['products_name'];?></a> <?php }else{?> <span class="w3-text-red"><?php echo $query_allready_rows . ' ' . $customer_reviews['products_name'];?></span> <?php }?> <?php if ($products_revd_status['products_status'] == '1'){?> <span class="pull-right hidden-xs hidden-sm"><?php echo tep_draw_button(MY_ACCOUNT_REVIEW_PRODUCTS_LG_MD, 'fa fa-pencil-alt', tep_href_link('product_reviews_write.php', 'products_id=' . $customer_reviews['products_id']), 'primary', NULL, 'btn btn-info btn-xs'); ?></span> <span class="pull-right hidden-md hidden-lg"><?php echo tep_draw_button(MY_ACCOUNT_REVIEW_PRODUCTS_SM_XS, 'fa fa-pencil-alt', tep_href_link('product_reviews_write.php', 'products_id=' . $customer_reviews['products_id']), 'primary', NULL, 'btn btn-info btn-xs'); ?></span> <?php }else{?> <span class="pull-right"><span class="w3-border w3-border-red w3-white w3-padding-small"><i class="fa fa-minus-circle w3-text-red"></i></span></span> <?php }?> </div> </div> <?php } }?> <div class="clearfix"></div><hr class="hr-trans mb-2 mt-1"> </div> <?php }?> <?php $customer_no_reviews_prod_query = tep_db_query("select o.customers_id, op.products_name, op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' group by op.products_name order by op.products_name ASC"); $customer_no_reviews_prod = tep_db_fetch_array($customer_no_reviews_prod_query); $query_allready_prod_reviewed = tep_db_query("select reviews_id from reviews where products_id = '" . (int)$customer_no_reviews_prod['products_id'] . "' AND customers_id = '" . (int)$_SESSION['customer_id'] . "'"); if (tep_db_num_rows($query_allready_prod_reviewed) > 0) { ?> <header class="w3-camo-forest w3-padding w3-xlarge"><?php echo MY_ACCOUNT_PRODUCTS_REVIEWED;?></header> <div class="w3-border mb-4"><div class="clearfix"></div><hr class="hr-trans mb-2 mt-2"> <?php $query_no_allready_rows = ''; $customer_no_reviews_query = tep_db_query("select o.customers_id, op.products_name, op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . $_SESSION['customer_id'] . "' and o.orders_id = op.orders_id and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' group by op.products_name order by op.products_name ASC"); while ($customer_no_reviews = tep_db_fetch_array($customer_no_reviews_query)){ $query_no_allready_rows++; if (strlen($query_no_allready_rows) < 1) { $query_no_allready_rows = '0' . $query_no_allready_rows; } $products_status_query = tep_db_query("select products_status from products where products_id = '" . $customer_no_reviews['products_id'] . "'"); $products_status = tep_db_fetch_array($products_status_query); $query_allready_reviewed = tep_db_query("select reviews_id from reviews where products_id = '" . (int)$customer_no_reviews['products_id'] . "' AND customers_id = '" . (int)$_SESSION['customer_id'] . "'"); if (tep_db_num_rows($query_allready_reviewed) > 0) { while ($allready_reviewed = tep_db_fetch_array($query_allready_reviewed)){ ?> <div class="col-sm-6"> <?php if ($products_status['products_status'] == '1'){?> <div class="mb-1 mt-1 w3-padding w3-border w3-border-green w3-food-pistachio"> <?php }else{?> <div class="mb-1 mt-1 w3-padding w3-border w3-border-red w3-pale-red"> <?php }?> <?php $printlist_norev_category_query = tep_db_query("select c.categories_id, c.categories_product_qty, c.category_stock_status, c.category_stock_info_status, c.cat_stock_att_image, cd.categories_id, cd.categories_name, cd.categories_stock, cd.categories_stock_alternatively, cd.categories_stock_replacement from products p, categories c, categories_description cd, products_to_categories pc where p.products_id = '" . $customer_no_reviews['products_id'] . "' and p.products_id = pc.products_id and pc.categories_id = cd.categories_id and cd.categories_id = c.categories_id and cd.language_id = '" . (int)$languages_id . "'"); $printlist_norev_category = tep_db_fetch_array($printlist_norev_category_query); ?> <?php if ($products_status['products_status'] == '1'){?> <a rel="preconnect" itemprop="url" href="<?php echo tep_href_link('product_info.php', 'products_id=' . $customer_no_reviews['products_id']); ?>"><?php echo $query_no_allready_rows . ' ' . $customer_no_reviews['products_name'];?></a></a> <?php }else{?> <span class="w3-text-red"><?php echo $query_no_allready_rows . ' ' . $customer_no_reviews['products_name'];?></span> <?php }?> <span class="pull-right"> <a rel="preconnect" itemprop="url" href="<?php echo tep_href_link('product_reviews.php', 'products_id=' . $customer_no_reviews['products_id']); ?>"> <?php if ($products_status['products_status'] == '1'){?> <span class="w3-border w3-border-green w3-hover-border-black w3-white w3-padding-small"><i class="fa fa-check w3-text-green w3-hover-text-black"></i></span> <?php }else{?> <span class="w3-border w3-border-red w3-hover-border-black w3-white w3-padding-small"><i class="fa fa-minus-circle w3-text-red w3-hover-text-black"></i></span> <?php }?> </a></span> </div> </div> <?php } } }?> <div class="clearfix"></div><hr class="hr-trans mb-2 mt-1"> </div> <?php }?>
  24. YePix

    Easy Admin Group - Login Issues

    wrong forum for this question
  25. I uploaded it to the apps but it is not published. I have no idea what's happening with oscommerce but unfortunately nothing has changed for the better lately.
×