Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

LED-Store

Pioneers
  • Posts

    36
  • Joined

  • Last visited

Profile Information

  • Real Name
    Cosmo Kramer
  • Location
    Switzerland
  • Website

LED-Store's Achievements

  1. Hi there, I think there are still some errors, the link in boxes/filter_printer.php should be: $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_FILTER_PRINTER_FINDER) . '">Ink & Toner Finder</a>'); instead of: $info_box_contents[] = array('text' => '<a "href=' . tep_href_link(FILENAME_FILTER_PRINTER_FINDER) . '">Ink & Toner Finder</a>'); Also in IE8 there is no action when you choose a filter, so you take "Apple" and nothing happens. In Firefox it works great. If everything can be fixed I will make a german translation, it's a great contrib, saves a lot of search time.
  2. No, it allows you in this case to put 10 of each product to your cart. I have the same script in my shop with 999999, so no one can buy more than 999999 pcs. of a product at a time. I made a test with 10, it works, believe me. When you put 11 or 999 to your cart, it changes to 10. Of course you can change the number to anything you want. I dont like dropdown boxes for quantity. This shop has a dropdown with 50pcs each, so if you want to order 43, it takes some time to find the right quantity.
  3. Hi rotulistaz, in the file includes/application_top.php, search for: $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false); And change it to: if ((int)$HTTP_POST_VARS['cart_quantity'][$i] > 10) { $HTTP_POST_VARS['cart_quantity'][$i] = 10; } $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
  4. When I make a backup with this tool, the size of the file is getting over 35mb. I installed some time ago the following Contrib: Database backup manager, it saves a lot of space, with this the backup is only 12mb! Example, instead of: drop table if exists address_book; create table address_book ( address_book_id int(11) not null auto_increment, customers_id int(11) default '0' not null , entry_usertype char(1) not null , entry_gender char(1) not null , entry_company varchar(50) , entry_firstname varchar(32) not null , entry_lastname varchar(32) not null , entry_street_address varchar(64) not null , entry_suburb varchar(32) , entry_postcode varchar(10) not null , entry_city varchar(32) not null , entry_state varchar(32) , entry_country_id int(11) default '0' not null , entry_zone_id int(11) default '0' not null , PRIMARY KEY (address_book_id), KEY idx_address_book_customers_id (customers_id) ); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('1', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('2', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('3', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('4', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('5', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('6', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('7', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('8', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('9', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); insert into address_book (address_book_id, customers_id, entry_usertype, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) values ('10', 'xxx', '', 'm', '', 'xxx', 'xxx', 'xxx', NULL, 'xxx', 'xxx', NULL, 'xxx', '0'); etc. The same code is now: drop table if exists `address_book`; CREATE TABLE `address_book` ( `address_book_id` int(11) NOT NULL auto_increment, `customers_id` int(11) NOT NULL default '0', `entry_usertype` char(1) NOT NULL default '', `entry_gender` char(1) NOT NULL default '', `entry_company` varchar(50) default NULL, `entry_firstname` varchar(32) NOT NULL default '', `entry_lastname` varchar(32) NOT NULL default '', `entry_street_address` varchar(64) NOT NULL default '', `entry_suburb` varchar(32) default NULL, `entry_postcode` varchar(10) NOT NULL default '', `entry_city` varchar(32) NOT NULL default '', `entry_state` varchar(32) default NULL, `entry_country_id` int(11) NOT NULL default '0', `entry_zone_id` int(11) NOT NULL default '0', PRIMARY KEY (`address_book_id`), KEY `idx_address_book_customers_id` (`customers_id`) ); insert into `address_book` (`address_book_id`, `customers_id`, `entry_usertype`, `entry_gender`, `entry_company`, `entry_firstname`, `entry_lastname`, `entry_street_address`, `entry_suburb`, `entry_postcode`, `entry_city`, `entry_state`, `entry_country_id`, `entry_zone_id`) values (1,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (2,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (3,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (4,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (5,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (6,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (7,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (8,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (9,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), (10,xxx,'','m','','xxx','xxx','xxx',NULL,'xxx','xxx',NULL,xxx,0), etc. Maybe this also can be done with this script, I tried to implement, but I receive only error messages... ;)
  5. You are the greatest, it works!! :) On the second page the last label is white, and on the third page the error begins again that one label is missing per pagebreak. But I never have more than 2 pages to print. Now the first label appears and the first pagebreak is also good. It works even with my billing and delivery address modification, so feel free to insert into your shop. Thanks, cosmo
  6. Maybe its also in this section, in the batch_print.php: if (!tep_db_num_rows($orders_query) > 0) { message_handler('NO_ORDERS'); } $num = 0; while ($orders = tep_db_fetch_array($orders_query)) { $order = new order($orders['orders_id']); if ($num != 0) { $pdf->EzNewPage(); }
  7. MindTwist, thank you very much, of course this is helpful for me, I'm already testing your "way". Maybe you can post your function print_address into the batch_print.php, I think then the problem is solved. I would be very grateful for that!! I also can share something, I made this with a friend. If you have different billing and delivery addresses, now it prints both addresses out. Maybe someone can use it, heres the function print_adress: function print_address($x, $y){ global $pdf, $num, $customer, $x, $y; $pos = $y; global $orders_query; if ($orders = tep_db_fetch_array($orders_query)){ $order = new order($orders['orders_id']); if ($order->delivery['street_address'] == $order->billing['street_address']) { if ($customer == true) { $addressparts1 = explode("\n", tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n")); }else{ $addressparts1 = explode("\n", tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n")); }} else { $addressparts1 = explode("\n", tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n")); $addressparts2 = explode("\n", tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n")); } //print ("orderID=" . $orders['orders_id'] . "<br>"); //print("DEBUG: inside 1nd addr. - " . "pos = " . $pos . " / y=" . $y . " / x=" . $x . "<br>"); $pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET,$y + ORDERIDYOFFSET,ORDERIDFONTSIZE,$orders['orders_id']); foreach($addressparts1 as $addresspart){ $fontsize = GENERAL_FONT_SIZE; while ($pdf->getTextWidth($fontsize, $addresspart) > LABEL_WIDTH - (2*STARTX)){ $fontsize--; } //$addresspart = preg_replace("%,[[:space:]]*$%", "", $addresspart); $pdf->addText($x,$pos -=GENERAL_LINE_SPACING,$fontsize,$addresspart); } if (isset($addressparts2)) { // 2. addr vorhanden ! // prüfen ob eins nach unten verschoben werden muss if ( $x >= STARTX + (2*LABEL_WIDTH)) { // eins nach unten $y -= LABEL_HEIGHT; // an den Zeilenanfang $x = STARTX; } else { $x += LABEL_WIDTH; } // print("DEBUG: inside 2nd addr. - " . "pos = " . $pos . " / y=" . $y . " / x=" . $x . "<br>"); $pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET,$y + ORDERIDYOFFSET,ORDERIDFONTSIZE,$orders['orders_id']); foreach($addressparts2 as $addresspart2){ $fontsize = GENERAL_FONT_SIZE; while ($pdf->getTextWidth($fontsize, $addresspart2) > LABEL_WIDTH - (2*STARTX)){ $fontsize--; } $pdf->addText($x,$y-=GENERAL_LINE_SPACING,$fontsize,$addresspart2); } $num++; if ($x < STARTX + NUM_COLUMNS * LABEL_WIDTH) { $y += LABEL_HEIGHT / 2; } } } else { return false; } }
  8. Hi MindTwist, I hope you can upload the step by step guide here, or you can also upload the whole file as an update. Maybe this saves time for you. Please share your solution with us, the link to the blog isnt working anymore. I have the same problem, always the first number is not printed out. Thank you!
  9. So I think we have different customer discount contribs, in my case its called customer_discount. I tried my best... =) regards
  10. If you receive an error message: Unknown column 'customer_discount' in 'field list', you forgot a step in the installation of customer discount: ALTER TABLE customers ADD customer_discount DECIMAL(5,2) DEFAULT '0' NOT NULL; The rest stays the same, I think in your case it should look like this: function process() { global $order, $currencies, $ot_subtotal, $customer_id; $od_amount = $this->calculate_discount($this->get_order_total()); if ($this->calculate_tax == 'true') $tod_amount = $this->calculate_tax_effect($od_amount); // Check if customer gets already customer_discount, if yes, disable this module. $query = tep_db_query("select customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $od_pc = $query_result['customer_discount']; if ($od_pc==0){ if ($od_amount > 0) { if (MODULE_QTY_DISCOUNT_RATE_TYPE == 'percentage') $title_ext = sprintf(MODULE_QTY_DISCOUNT_PERCENTAGE_TEXT_EXTENSION ,$this->calculate_rate($_SESSION['cart']->count_contents())); $this->deduction = $od_amount+$tod_amount; $this->output[] = array('title' => sprintf(MODULE_QTY_DISCOUNT_FORMATED_TITLE, $title_ext), 'text' => sprintf(MODULE_QTY_DISCOUNT_FORMATED_TEXT, $currencies->format($od_amount)), 'value' => $od_amount); $order->info['total'] -= $this->deduction; $order->info['tax'] -= $tod_amount; if ($this->sort_order < $ot_subtotal->sort_order) $order->info['subtotal'] -= $this->deduction; } } // end of customer check }
  11. I made this on my shop, works like a charm. In the file catalog/includes/modules/ot_loyalty_discount.php after: function process() { global $order, $ot_subtotal, $currencies, $customer_id; $od_amount = $this->calculate_credit($this->get_order_total(), $this->get_cum_order_total()); Add this: // Check if customer gets already customer_discount, if yes, disable this module. $query = tep_db_query("select customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $query_result = tep_db_fetch_array($query); $od_pc = $query_result['customer_discount']; if ($od_pc==0){ Find: } // end of function process() Above add: } // end of customer check Maybe you have to add $customer_id to the global string, like above. Have fun, cosmo
  12. So where is the update? On the Development-Info-Box everythings finished for at least a month, except subgalleries, so I cannot wait to install all the new features... =) Thanks!
  13. Thanks for this great contrib, I waited years for something like this! Very time-saving contribution!! But is it possible to open the oc_batch_status_change.php instead of in a new window, to open it in a popup window? It gets a little bit annoying me when it opens always a new window, a popup would be much better. I tried several things, the popup also gets opened, but there are no data redirected from the order.php, so nothing happens in the popup. <script type="text/javascript"> var attribWithoutAll="location=no,menubar=no,toolbar=no,status=no"; attribWithoutAll+=",resizable=no,scrollbars=no,width=450,height=200"; var subwindow=0; function box() { subwindow=window.open("oc_batch_process.php","popup",attribWithoutAll); subwindow.moveTo(10,50); } </script> <?php echo tep_draw_form('batch_orders', 'oc_batch_process.php', '', 'post', 'onsubmit="box();"'). "\n"; ?> Here is my ineffective attemp, does someone know how this can be realised that it works? Thx a lot, Luke
  14. @ Jos Medinger You can add this to the $history_query_raw: ... and o.customers_id != 0 and ot.class ...
  15. Is there a possibility to add the giftwrap charge in percents?? I think its a pretty difference if a customer buys one small gift, or twenty big gifts. If he buys 20 big gifts, the giftwrap charge should increase, so it would be great if this contribution supports pecentage costs. I want to sell Light Emission Diodes (LEDs), and with this contrib I will offer: Buy with or w/o resistors, so I use a percentage charge... B) Regards, lucas
×
×
  • Create New...