Jump to content

YePix

Members
  • Content count

    248
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by YePix

  1. YePix

    Weekly sales reporting in admin help needed

    or just add this line. As far as I have seen in ot_subtotal no discounts shipping costs or anything else. So the net price.
  2. YePix

    Weekly sales reporting in admin help needed

    and change in classes/sales_report.php ot.class = 'ot_subtotal' to ot.class = 'ot_total'
  3. YePix

    WYSIWYG product description

    then you have definitely installed this wrong
  4. Hi folks, I have installed the PhpMailer and everything so far ok and without errors. The problem is only the mails are shown as sent but do not arrive. Does anyone have a suggestion for me?
  5. YePix

    SMTP Authentication and OSCommerce

    the new classes email.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce */ require_once 'ext/modules/PHPMailer/class.phpmailer.php'; $phpMail = new PHPMailer(); class email { var $html; var $text; var $html_text; var $lf; var $debug = 0; var $debug_output = 'error_log'; function email($headers = '') { global $phpMail; $phpMail->XMailer = 'PL-Gastrosystem ' . tep_get_version(); $phpMail->SMTPDebug = $this->debug; $phpMail->Debugoutput = $this->debug_output; $phpMail->CharSet = CHARSET; $phpMail->WordWrap = 998; if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } } function add_text($text = '') { global $phpMail; $phpMail->IsHTML(false); $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); } function add_html($html, $text = NULL, $images_dir = NULL) { global $phpMail; $phpMail->IsHTML(true); $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br />', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->html = $phpMail->msgHTML($this->html, $images_dir); } function add_attachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { global $phpMail; $phpMail->AddAttachment($path, $name, $encoding, $type, $disposition); } function build_message() { //out of work function } function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $reply_to = false) { global $phpMail; if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) { return false; } if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) { return false; } if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) { return false; } if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) { return false; } if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) { return false; } $phpMail->From = $from_addr; $phpMail->FromName = $from_name; $phpMail->AddAddress($to_addr, $to_name); if ($reply_to) { $phpMail->AddReplyTo(EMAIL_SMTP_REPLYTO, STORE_NAME); } else { $phpMail->AddReplyTo($from_addr, $from_name); } $phpMail->Subject = $subject; if (!empty($this->html)) { $phpMail->Body = $this->html; $phpMail->AltBody = $this->html_text; } else { $phpMail->Body = $this->text; } if (EMAIL_TRANSPORT == 'smtp' || EMAIL_TRANSPORT == 'gmail') { $phpMail->IsSMTP(); $phpMail->Host = EMAIL_SMTP_HOSTS; $phpMail->SMTPAuth = EMAIL_SMTP_AUTHENTICATION; $phpMail->Username = EMAIL_SMTP_USER; $phpMail->Password = EMAIL_SMTP_PASSWORD; if (EMAIL_TRANSPORT == 'gmail') { $phpMail->Port = 465; $phpMail->SMTPSecure = 'ssl'; } } else { $phpMail->isSendmail(); } if (!$phpMail->Send()) { return false; } $phpMail->clearAddresses(); return true; } } /* ** Altered for Mail Manager ** */ // eliminate line feeds as <br> class emailMailManager extends email { function add_html($html, $text = NULL, $images_dir = NULL) { $this->html = $html; //tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html); $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); if (isset($images_dir)) $this->find_html_images($images_dir); } } /* ** EOF alterations for Mail Manager ** */ ?>
  6. does anyone of you already have experience with receipt printer and oscommerce?
  7. I mean the ticket printers in the gastronomy
  8. Hello people, I would like to give time-limited release on certain products. I tried it with the following code but unfortunately it does not work. could someone please suggest something to me wi I could realize it? $pls_customer_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $pls_customer = tep_db_fetch_array($pls_customer_query); $vip_expires_date = tep_date_long($pls_customer['expires_date']); if (date('yyyy-mm-dd', strtotime($vip_expires_date)) >= date('yyyy-mm-dd')) { xxxxxxx }
  9. that's not true. use tooltip on mobile devices and everything works fine
  10. Maybe that helps you a little bit further https://www.w3schools.com/css/css_tooltip.asp
  11. @ecartz You were right. But now in the general.php I've swapped the (int)$option with (int)$prid and everything works perfect
  12. if today a offer is released and a customer this in the basket you put this offer but tomorrow deactivates this product remains in the basket and the customer can still buy this after some time, although in the shop this is no longer to be found. In order to remove these offers from the cart that are deactivated and the customer can no longer buy them, the class must be changed a bit. applies to all versions. catalog/includes/classes/shopping_cart.php Find: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); Change to: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "' and products_status = 1"); Find: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_baseprice, p.products_deposit, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Change to: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_baseprice, p.products_deposit, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_status = 1");
  13. the customers_bascet_id is responsible for the sorting of the products in CUSTOMERS_BASKET and the attributes are assigned to the products_id and therefore the same product is stored individually. I can not find only the code where the products_id writes in the CUSTOMERS_BASCET
  14. no, that's not true. have just manually changed the products_id in the db for the same product with different attributes and everything works fine. the CUSTOMERS_BASCET stores the products_id and the rest in the CUSTOMERS_BASCET_ATTRIBUTES. thus it is unnecessary to save the string after the products_id
  15. Fetching the products without paying the line is the one thing, how do I get that these characters are not written to the CUSTOMERS_BASCET as products_id? i need a pure products_id Can someone help me with this?
  16. the same product but different id in the cart. does anyone have any idea why? https://xxx.de/product_info.php?products_id=32{21}17{16}1{1}1{18}1{15}1{17}1{4}1{23}1{10}1{12}1{20}1{19}1{11}1{9}1{3}1{8}1{2}1{14}1{22}1{13}1 https://xxx.de/product_info.php?products_id=32{21}17{15}1{17}1{16}1{1}1{18}1{14}1{22}1{13}1{4}1{23}1{10}1{12}1{20}1{19}1{11}1{9}1{3}1{8}1{2}1
  17. Now I need some help with the products_id. Why is the same product, which has been put into the shopping cart several times, always filed as a single article? it's about the count generated for attributes. same product same attributes and each other id?
  18. The point is that if I have a product that is only once in the week as an offer that can only be bought on this one day as an offer. That's exactly how customers come to the shop on this particular day. For this reason, this article must also automatically as an offer when you deactivate the normal price without having to rummage through the offers to this one to disable The product is always in stock and also available. only the status between normal price and offer changes weekly. something cleaner in the shopping_cart.php class Find: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $this->total += $currencies->calculate_price($products_price, $products_tax, $qty); $this->weight += ($qty * $products_weight); Change to: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select s.specials_new_products_price from " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS . " p where p.products_id = s.products_id and s.products_id = '" . (int)$prid . "' and s.status = '1' and p.products_status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $this->total += $currencies->calculate_price($products_price, $products_tax, $qty); $this->weight += ($qty * $products_weight); ##################################################### Find: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } Change to: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select s.specials_new_products_price from " . TABLE_SPECIALS . " s, " . TABLE_PRODUCTS . " p where p.products_id = s.products_id and s.products_id = '" . (int)$prid . "' and s.status = '1' and p.products_status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; }
  19. yes, if you want to disable them individually
  20. I'm curious if 30 or 40 customers have such an offer in the cart and buy it later at a later date although this is no longer available. Do you pay then to make your customers happy?
  21. here a little better solution. Once an offer is deactivated, the price is automatically set to the regular value testing only for EDGE <?php catalog/includes/classes/shopping_cart.php Find: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $this->total += $currencies->calculate_price($products_price, $products_tax, $qty); $this->weight += ($qty * $products_weight); Change to: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight, products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); if ($product = tep_db_fetch_array($product_query)) { if ($products['products_status'] == 0){ $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; }else{ $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows ($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } } $this->total += $currencies->calculate_price($products_price, $products_tax, $qty); $this->weight += ($qty * $products_weight); ##################################################### Find: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } Change to: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_status, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { if ($products['products_status'] == 0){ $prid = $products['products_id']; $products_price = $products['products_price']; }else{ $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } } ##################################################### Find: $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); Change to: $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'status' => $products['products_status'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); ##################################################### catalog/shopping_cart.php Find: $products_name .= '</td>'; $products_name .= '</td></strong><td align="right" valign="top"><strong>' . TEXT_TODAY_NON_AVALIABLE . ' ' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' . '</tr>'; Change to: if ($products[$i]['status'] == 0){ $products_name .= '</td>'; $products_name .= '</td></strong><td align="right" valign="top"><strong>' . TEXT_TODAY_NON_AVALIABLE . ' ' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' . '</tr>'; }else{ $products_name .= '</td>'; $products_name .= '</td></strong><td align="right" valign="top"><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' . '</tr>'; } ##################################################### catalog/checkout_confirmation.php Find: for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { Add after: $product_info_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$order->products[$i]['id'] . "'"); $product_info = tep_db_fetch_array($product_info_query); Find: echo '</td>' . "\n"; echo '<td align="right" valign="top"><br>' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $pls_taxinfo . '</td>' . "\n" . '</tr>' . "\n"; Change to: if ($product_info['products_status'] == 0){ echo '</td>' . "\n"; echo '<td align="right" valign="top"><br>' . TEXT_TODAY_NON_AVALIABLE . ' ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" . '</tr>' . "\n"; }else{ echo '</td>' . "\n"; echo '<td align="right" valign="top"><br>' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" . '</tr>' . "\n"; } ##################################################### catalog/includes/languages/english.php Add: define('TEXT_TODAY_NON_AVALIABLE', 'No offer available today ');
  22. bug fix Find: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); Change to: // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "' and products_status = 1"); Find: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Change to: $products_array = array(); foreach(array_keys($this->contents) as $products_id) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_status = 1");
×