Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

lsd_se

Archived
  • Posts

    132
  • Joined

  • Last visited

Everything posted by lsd_se

  1. I am using the contrib which allows you to display your attributes in a table and displays the actual price rather then "+$5" etc. A problem I am having is that I enter the price regularly in the product page, and then add attributes, some of these attributes increase the price, while some of them don't, so the attribtue value would be 0. But if the attrbute is 0 it won't show up. how can I get it to show up even if the value is 0? I think it has to do with this coding, but I'm not advanced enough to figure out how to change it. $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; Under this ADD ( before the } ): if ($products_options['price_prefix'] == '+') { $price_with_attribute = ($product_info['products_price'] + $products_options['options_values_price']); } else { $price_with_attribute = ($product_info['products_price'] - $products_options['options_values_price']); } ?> <tr> <td class="main" align="center"> <?php echo $products_options['products_options_values_name']; echo tep_draw_hidden_field('a[]', $products_options['products_options_values_id']); echo tep_draw_hidden_field('b[]',$products_options_name['products_options_id']); ?> </td> <td class="main" align="center"> <?php /* uncomment if you want to show the model number echo $product_info['products_model']; */ ?> </td> <td class="main" align="center"><?php echo $currencies->display_price($price_with_attribute, tep_get_tax_rate($product_info['products_tax_class_id'])); ?></td> <td class="main" align="center"><?php echo tep_draw_input_field('quantity[]',$value = '0',"size=2");?></td> </tr> <?php $x++;
  2. My store sells car parts, and I have parts that have multiple vehicle applications. For example, an Acme radiator hose has versions for a Toyota, Nissan, Honda etc. Instead of entering the same product a whole bunch of times for each vehicle application, I wanted to enter the product once, and have multiple options in the product info page for the application. Each application often has a different price as well. I am using the Att Qty Product Info Contrib, that allows me to set the initial product price to $0, and then add each car model with it's specific price using the attributes function, and display it in a nice table. contrib: http://addons.oscommerce.com/info/3345 example on my site: http://www.jdmspeedshop.com/product_info.p...products_id=447 As you can see, the vehicle applications and prices are nicely listed in a table, and we can avoid multiple product entries of the same product into the database. Now, I am redoing the entire site from the ground up and I need some more functions available here. What I'd like is the same table, however I'd like to also show the MSRP, My Price, and Savings % in this table as well. I can find this contrib (http://addons.oscommerce.com/info/3574), but I have no idea how to mate it with this attributes contrib. So my question is, how on earth do I do this? Is there a better way to do this from the start? I can't find a contrib that allows multiple pricing and options for single product. Also, my current configuration is not compatible with the specials function, and I need it to be as well. I'd be willing to pay someone to help me with this if they can do the programming, or help me with a solution. Any hints, suggestions, or referrals are greatly appreciated. Thanks!
  3. I just need a bit of help figuring something out, I'm sure it's quite easy.... I have this contribution installed and it's working wonderfully (http://www.oscommerce.com/community/contributions,1446/category,all/search,Additional+Shipping+Options+for+Table), however in my list of 3 shipping options, it always defaults the check to the cheapest option, which in my list is at the bottom. I'd like the default shipping option to be the first option in the list. Im' not sure how to change this in the modules/shipping/table.php file. If anyone could help I'd be forever grateful! Here is the code to peruse... <?php /* $Id: table.php,v 1.27 2003/02/05 22:41:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ class table { var $code, $title, $description, $icon, $enabled; // class constructor function table() { global $order; $this->code = 'table'; $this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE; $this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER; // $this->icon = DIR_WS_ICONS . 'shipping_ups.gif'; //$this->icon = ''; $this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order, $cart, $shipping_weight, $shipping_num_boxes,$order_total; if (MODULE_SHIPPING_TABLE_MODE == 'Price') { $order_total = $cart->show_total(); } else { $order_total = $cart->show_weight(); } $availableMethods = array(); for ($methodNum = 1; $methodNum <= MODULE_SHIPPING_TABLE_NUMBER_OF_METHODS; $methodNum++) { $table_cost_name = 'MODULE_SHIPPING_TABLE_COST_METHOD_' . $methodNum; $table_text_name = 'MODULE_SHIPPING_TABLE_TEXT_METHOD_' . $methodNum; $table_cost = split("[:,]", constant($table_cost_name)); for ($i = 0; $i < sizeof($table_cost); $i += 2) { if (($table_cost[$i] == "infinity") || ($table_cost[$i] >= $order_total)) { $shipping = $table_cost[$i+1]; break; } } if ($i == sizeof($table_cost)) continue; if (MODULE_SHIPPING_TABLE_MODE == 'Weight') { $shipping *= $shipping_num_boxes; } if ( ($method == '') || ($method == $methodNum) ) { $availableMethods[] = array('id' => $methodNum, 'title' => constant($table_text_name), 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING); } } if (sizeof($availableMethods)) { $this->quotes = array('id' => $this->code, 'module' => $this->title, 'methods' => $availableMethods); } else { return false; } if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_TABLE_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { global $language; require(DIR_FS_CATALOG_LANGUAGES . "$language/modules/shipping/table.php"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Table Method', 'MODULE_SHIPPING_TABLE_STATUS', 'True', 'Do you want to offer table rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Table Method', 'MODULE_SHIPPING_TABLE_MODE', 'weight', 'The shipping cost is based on the order total or the total weight of the items ordered.', '6', '0', 'tep_cfg_select_option(array(\'Weight\', \'Price\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_TABLE_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_TABLE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_TABLE_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_TABLE_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); if (0) { for ($methodNum = 1; $methodNum <= MODULE_SHIPPING_TABLE_NUMBER_OF_METHODS; $methodNum++) { $method = 'METHOD_' . $methodNum; $table_cost_name = 'MODULE_SHIPPING_TABLE_COST_' . $method; $table_text_name = 'MODULE_SHIPPING_TABLE_TEXT_' . $method; $sql = "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . constant($table_text_name) . " Shipping Table', '" . $table_cost_name . "', '25:8.50,50:5.50,10000:0.00', 'The shipping cost is based on the total cost or weight of items. Example: 25:8.50,50:5.50,etc.. Up to 25 charge 8.50, from there to 50 charge 5.50, etc', '6', '0', now())"; //echo $sql . '<br>'; tep_db_query($sql); } } else { $methodNum = 0; do { $methodNum++; $table_cost_name = "MODULE_SHIPPING_TABLE_COST_METHOD_$methodNum"; $table_text_name = "MODULE_SHIPPING_TABLE_TEXT_METHOD_$methodNum"; if (!defined($table_text_name)) { $methodNum--; break; } $sql = "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('" . constant($table_text_name) . " Shipping Table', '" . $table_cost_name . "', '25:8.50,50:5.50', 'The shipping cost is based on the total cost or weight of items. Example: 25:8.50,50:5.50. Up to 25 charge 8.50, from there to 50 charge 5.50, past 50 and this option is not allowed. Can also specify \"infinity\" to avoid a cap 25:8.50,50:5.50,infinity:4.75', '6', '0', now())"; tep_db_query($sql); } while (1); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Number of Methods', 'MODULE_SHIPPING_TABLE_NUMBER_OF_METHODS', '$methodNum', 'Number of registered shipping methods.', '6', '0', now())"); } } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE_SHIPPING_TABLE%'"); } function keys() { $retval = array('MODULE_SHIPPING_TABLE_STATUS', 'MODULE_SHIPPING_TABLE_MODE', 'MODULE_SHIPPING_TABLE_HANDLING', 'MODULE_SHIPPING_TABLE_TAX_CLASS', 'MODULE_SHIPPING_TABLE_ZONE', 'MODULE_SHIPPING_TABLE_SORT_ORDER'); $result = tep_db_query("select configuration_key from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE_SHIPPING_TABLE_COST_METHOD%' order by configuration_key"); while ($row = tep_db_fetch_array($result)) { $retval[] = $row['configuration_key']; } return $retval; } } ?>
  4. I have a template installed on my fresh install....the main page text area has been removed and I have new products listed on the main page. I'd like to remove the new products module and replace it with an area where I can type some news and place images. A very simple text area would be fine. I can't find a contrib that does this, is there one that I have missed? Thanks for any advice!
  5. I have no idea where the 9 is coming form. I checked the code and there are no nines in it! I tried redoing it with teh same result. help!
  6. I have 3 table rates, EMS 5 day air, SAL 14 day air, and Surface, whta are based on the weight of the order. The EMS and SAL rates work fine and calculate proper shipping rates. However the surface rate is always $9, and I can't figure out why. Here is what my breakdown looks like in the shipping module: EMS Worldwide 5 Day Air Shipping Table 1:28, 1.5:37, 2:44, 2.5:50, 3:58, 3.5:67, 4:72, 4.5:80, 5:90, 5.5:98, 6:105, 7:110, 8:125, 9:130, 10:150, 11:160, 12:170, 13:180, 14:190, 15:210, 16:220, 17:230, 18:240, 19:250, 20:270, 21:280, 22:310, 23:320, 24:330, 25:340, 26:350, 27:360, 28:370, 29:380 SAL Worldwide 7-14 Day Air Shipping Table 1:27, 1.5:27, 2:38, 2.5:50, 3:50, 3.5:61, 4:61, 4.5:73, 5:73, 5.5:83, 6:83, 7:94, 8:104, 9:115, 10:125, 11:132, 12:139, 13:146, 14:153, 15:160, 16:167, 17:174, 18:181, 19:188, 20:195, 21:200, 22:209, 23:216, 24:223, 25:230, 26:237, 27:244, 28:251, 29:258 Surface Worldwide 4-7 Week Shipping Table 1:18, 1.5:23, 2:23, 2.5:29, 3:29, 3.5:34, 4:34, 4.5:40, 5:40, 5.5:45, 6:45, 7:51 8:56, 9:62, 10:67, 11:71, 12:74, 13:78, 14:81, 15:85, 16:88, 17:92, 18:95, 19:99, 20:102, 21:106, 22:109, 23:113, 24:116, 25:120, 26:123, 27:127, 28:130, 29:134, 30:137 I can't see any reason why it might be doing this...any suggestions? Thanks!
  7. thanks, I had the same problem and all I had to do was uninstall->reinstall teh module. thanks for the reply!
  8. thanks so much Amanda, that worked perfectly!! i really apprecaite all your help, you are a great community member and we are lucky to have you. now jsut to figure out why my footer bg disappears with the discount mod lol thanks again! daryl
  9. oh so it's somehting different then... here's the top of my shoppoing_cart.php include_once (DIR_WS_FUNCTIONS.'easy_discount.php'); // $easy_discount->set('discount name','discount description',40); ?> <!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 //--> <!-- body //--> <?php include_once(DIR_WS_FUNCTIONS.'easy_discount.php'); $easy_discount->reset(); if($promo_code == 'SPECIAL') { $easy_discount->add('ECD','GPT2006 Discount',40); } ?> Thanks again Amanda Daryl
  10. Hi Amanda, The link is here: http://www.iapecc.com/jdmspeedshop/index.php The discount code is SPECIAL all in caps. Thanks for your time Daryl
  11. Hi Amanda, Thanks for your reply! I tried this coding but it didn't seem to work. I can still apply the discount even if only 1 item is in the cart. Here's what the bottom of my applicaiton_top file looks like: if (!tep_session_is_registered('easy_discount')) { tep_session_register('easy_discount'); $easy_discount = new easy_discount(); } if (!tep_session_is_registered('promo_code')) { tep_session_register('promo_code'); $promo_code = ''; } if ($cart->count_contents() > 1) { // more than 1 item in the cart $easy_discount->set('40OFF','2 plus Discount',40); } else { $easy_discount->clear('40OFF'); } ?> do i have to declare someting else? Thanks for any help Daryl
  12. thanks for your reply amanda. the discount is $40 off any orders of 2 or more items. thanks daryl
  13. thanks for your reply amanda but i'm sorry....i can't figure this out at all....im not trained in writing php code. i've modded lots of phpbb boards and oscommerce sites, but i can't generate the code myself :( so if i put the following in my application top.php: if (($cart->count_contents() > 1) and (condition)) { // more than 1 item in the cart and any other condition $easy_discount->set(......); } else { $easy_discount->clear(......); } what would i put in the condition brackets, and what would I put in the (.....) after set and clear? I just want the discount to only apply in cases where 2 or more items have been ordered. I apologize for fumbling this around so much, i wish i was more fluent in php. thanks for any help you can offer daryl
  14. Hi Boxtel, Thanks a lot of your reply. I've been playing around with this for a few days but can't figure out where I should place this code. Should it go in includes->functions->easy_discount.php? If so, where, before $discount .= '<tr><td width="100"...... thanks for any suggestions! Daryl
  15. great thanks! I was trying to find where I needed to make those changes. I have it all fixed up and looking beautiful now! I just had 2 more questions to ask, then I'm done ;) 1. I want only this discount to be applied to orders of 2 or more items. I tried changing the coding in both functions/easy_discount.php and shopping_cart.php but neither of them worked. the discount line disappeared. I though it was as easy as changing the 0 in this line to 2 : if ($easy_discount->count() > 0) { How would I add this "2 or more items' switch into the coding? 2. after i added this contrib i lost the background in my footer on the shopping_cart.php page. there must be an open tag, would it be located in shopping_cart.php? Thanks for any suggestions! Daryl
  16. 1 more question.... I'm having some trouble with the formatting in shopping_cart.php Where do I change the formatting for this? In shopping_cart.php? I jsut can't get it to change.... Ive tried putting it before and after the last </tr> but it doesn't make a difference. Any suggestions?
  17. I have installed this add on from page 3 and it seems to work, however, the discount is not being applied. the discount amount is showing up as the discount name, and the value is showing up as 0. also there is an error of: Warning: Missing argument 3 for add() in /home/iapeccc/public_html/***************/includes/classes/easy_discount.php on line 17 Are there any updates or fixes for this add on? Any suggestions as to what i may have done wrong? Thanks for any suggestions! ***edit nevermind, i found the fix int he next post, sorry *****
  18. ahhhh, i see now. the subtotal and discount were both set to sort order 2, which was cancelling out the discount. if i set them all to seperate sort orders it works. thanks very much for your help boxtel, you are a great person to have on this forum!! regards, daryl
  19. I have the module installed..the summary is like this in admin->module->order total Easy discount. Activate Easy Discount true Sort Order 2
  20. Hi Everything is working fine now...however the total is being adjusted in the shopping cart, but not the checkout_confirmation.php page, the price is regular here. So if the customer decides to pay by PayPal the item is not discounted. I placed "$easy_discount->set('discount name','discount description',discount);" in the top of the shopping_cart.php page, and did the add ons for shopping_cart.php. I assume I have to add something to the checkout_confirmation page? Thanks for any advice. Daryl
  21. thanks for your reply boxtel, i will start over again from scratch and see how it goes thanks again.
  22. also, i jsut added the shopping cart add on, but now I get this error: Fatal error: Unknown function: easy_discount_display() in /home/public_html/jdm*******/shopping_cart.php on line 164
  23. Hi I am trying to install this contrib, but I'm having a few problems. I looked through about 15 pages of this thread but then gave up since it's mostly modifications of the contrib. Here's what I did: I copied all the files to their directories. I added: // include easy discount products class require(DIR_WS_CLASSES . 'easy_discount.php'); and if (!tep_session_is_registered('easy_discount')) { tep_session_register('easy_discount'); $easy_discount = new easy_discount(); } to applicaiton_top then I added: if ($cart->count_contents() > 1) { $easy_discount->set('CQTY','Cart Quantity Discount',40); } else { $easy_discount->clear('CQTY'); } after require("includes/application_top.php"); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); in shopping_cart.php Problem I cannot see what this contrib has actually done. there is no discount applied and i cannot see it in any pages. i have turned it on in admin as well. All I want is to be able to make this contrib work. and then modify it to give a discount if a certain amount of (ex. over $100) of items are ordered. If anyone could help me out that would be great as this is all I need to get working before my store is ready to go. Thanks Daryl
  24. Hi I recently installed the Easy Coupons contrib and it seems to be working fine as I am not getting any errors and the admin side works perfectly. The problem I've having is that in the window during checkout I ccan see the boxes where I type in the coupon code, but I cannot actually input anything. It's like the boxes and the "cash in" button are images, I cannot highllight them, and I cannot enter anything in the box. I assume that I've made an error in the coding somewhere but I can't find it. Any suggestions? Thanks! :)
  25. After installing Prducts Extra Fields I had this error. I can't figure out where I went wrong. ------------------------------------ 1054 - Unknown column 'pef.languages_id' in 'where clause' SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM products_extra_fields pef LEFT JOIN products_to_products_extra_fields ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=280 and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='1') ORDER BY products_extra_fields_order [TEP STOP] -------------------------------------- This error is shown in the product info window. Any suggestions would be greatly appreciated!
×
×
  • Create New...