Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

YePix

Members
  • Posts

    434
  • Joined

  • Last visited

  • Days Won

    9

YePix last won the day on January 22 2023

YePix had the most liked content!

2 Followers

Profile Information

  • Real Name
    YePix

Recent Profile Visitors

28,980 profile views

YePix's Achievements

  1. select p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, p.products_image from products p, products_description pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '1' order by p.products_ordered limit 20
  2. order by p.products_id DESC, pd.products_name limit " . YOUR_LIMIT_OF_PRODUCTS
  3. osCommerce has the built-in function to sell downloads. All you need is a few settings and the purchase via download is set up.
  4. Try this: Open a page with captcha, click somewhere around the code a few times, wait a few seconds and you're done. It's so easy to ignore Google. Furthermore, checkout_shipping, checkout_payment, checkout_confirmation and checkout_proccess kicked you out if you weren't logged in. How could you then complete an order via the browser entry as a customer who was not already registered and logged in?
  5. The only question is, for what? Do you want to lose your customers? If a customer is already registered, he or she has already confirmed the security query for spam and this issue is therefore off the table. With freely accessible forms, such as the contact form, things are different.
  6. Hello to all sympathizers of the 2.3.4 BS version of osCommerce. I revised the software and tested the installation on php8 several times. If anyone is interested, just download and use. If you write any addons, I would be happy if you would send them to me so that I can make them available to other users. I hope this software has a long life ahead of it. Kind regards, Peter. You can find all the information here...
  7. But you have to keep in mind that the program is not suitable for PHP 8. Countless work is necessary to be able to work optimally with it.
  8. for what this payment method ? Crypto market will soon end anyway
  9. 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');
  10. 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.
  11. 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 }?>
×
×
  • Create New...