Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

maxxxie

Archived
  • Posts

    136
  • Joined

  • Last visited

Everything posted by maxxxie

  1. DJ, that works perfectly! Thankyou once again :) :) :) Max
  2. Hi all, I currently use EasyPopulate (2.76c-MS2) to export and import product information to a CSV file. I'd like to automate the export process so that it runs once a day, and drops a file called "products.csv" into a publicly-accessible directory (ie httpdocs/somefolder/products.csv). It seems that cron is probably the way to do this, but I have two questions: 1. EP lives in the httpdocs/admin folder, which is protected by .htaccess. How do I get around the admin password, short of moving EP to a folder under the httpdocs root (with associated path changes etc); and 2. How do I tell EP to dump the file into a different location than the normal ep-temp folder? My guess on number 2 is to simply use a modified easypopulate.php file, with different paths/folder names to output, but I have no idea about question 1. I know this has been asked before, but I can't find a definitive answer. Can anyone assist please? Cheers, Max
  3. Hi DJ, Thanks for all your previous assistance with this contribution. I've installed version 5.0.5 and I have one minor problem with it. If I insert a comment on the order, and that comment happens to contain an apostrophe, it produces a MySQL error: If I use the text "whats the story" instead of "what's the story", it's inserted correctly. Can you assist please? Also, is it OK to continue using 5.0.5, or should I upgrade to 5.0.6? Max
  4. I had this problem too a while back. Give DJMonkey's suggestion a go (he's a top bloke, knows what he's doing!), but if you get no joy, my workaround was to use FireFox web browser instead of Internet Explorer. Hope this helps, Max
  5. Hi everyone, I'd like to have a payment module that works along the lines of a lay-by system. The customer is presented with a total, then presented with a value of 10% which is the deposit they must pay for the order to be acted upon. It is a requirement that the customer receive a receipt stating the terms and conditions of the layby arrangement. My intention is to use email to do this. To this end, I've butchered the Monthly Installments module and combined it with another payment module (Australian bank deposits) to suit my needs. At checkout, the customer is presented with the terms and conditions and the 10% deposit value they must put down. No worries. But I can't seem to get the deposit value to go into the order confirmation email. The best I can do is to derive 10% of the cart total excluding shipping. But I want to show 10% of the total, not the subtotal. Here's the code I've played with so far (complete with inept failed attempts at fixing the email problem): <?php /* $Id: LAYBY.php,v 1.10 2003/01/29 19:57:14 hpdl Exp $ amended by Edwin Martinez osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class layby { var $code, $title, $description, $enabled; // class constructor function layby() { global $HTTP_POST_VARS, $order, $currencies, $cart; $this->code = 'layby'; $this->title = MODULE_PAYMENT_LAYBY_TEXT_TITLE; $this->description = MODULE_PAYMENT_LAYBY_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_LAYBY_SORT_ORDER; // $this->enabled = ((MODULE_PAYMENT_LAYBY_STATUS == 'True') ? true : false); if(MODULE_PAYMENT_LAYBY_STATUS == 'True'){ if($_SESSION['cart']->total>=100){ $this->enabled = true; } else { $this->enabled = false; } } else { $this->enabled = false; } if ((int)MODULE_PAYMENT_LAYBY_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_LAYBY_ORDER_STATUS_ID; } // $this->email_footer = MODULE_PAYMENT_LAYBY_TEXT_EMAIL_FOOTER; //echo ($_SESSION['order']->total); //$down_payment = ($_SESSION['order']->total) * 0.10; // $orderinfototal = $order->info['total']; // $orderinfototal = $_SESSION['order']->total; // $orderfinalprice = $order->products['final_price']; //$orderinfoshipping = $_SESSION['order']->info['shipping_cost']; //$ordertotal = $orderinfototal + $orderinfoshipping; $down_payment = $_SESSION['cart']->total / 10; // $down_payment2 = $currencies->price() * 0.10; $EMAIL_LAYBY12 = "Please note: \nYour initial payment (deposit) is: " . number_format($down_payment, 2) . "\n"; $this->email_footer = MODULE_PAYMENT_LAYBY_TEXT_EMAIL_T_AND_C . $EMAIL_LAYBY12 . MODULE_PAYMENT_LAYBY_TEXT_EMAIL_FOOTER; // $this->email_footer = "orderinfototal: " . $orderinfototal . ", orderfinalprice: " . $orderfinalprice; //. " , orderinfoshipping" . $orderinfoshipping . ", ordertotal" . $ordertotal; if (is_object($order)) $this->update_status(); } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_LAYBY_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_LAYBY_ZONE . "' and zone_country_id = '" . $order->billing['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->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { return false; } function selection() { return array('id' => $this->code, 'module' => $this->title); } function pre_confirmation_check() { return false; } function confirmation() { global $HTTP_POST_VARS, $order, $currencies; define('TOTAL_PAYMENT_INT12', microtime()); $down_payment= $currencies->price() * 0.10; //$monthly_payment= ($currencies->price() - $down_payment) * 0.10573; //$salary = ($monthly_payment / 0.2); // $LAYBY12= 'Please note: <br><b> Down Payment: <font color="red"> ' . number_format($down_payment, 2). '</font color><br> 12 Payments of: <font color="red">' . number_format($monthly_payment, 2). ' </b></font color>'. '<br> To apply for this credit line you must have minimum monthly earnings of: <b>' . number_format($salary, 2) . '</b> <br>'; $LAYBY12= 'Please note: <br><b>Your initial payment (deposit) is: <font color="red"> ' . number_format($down_payment, 2) . '</b></font color> <br>'; return array('title' => MODULE_PAYMENT_LAYBY_TEXT_T_AND_C . $LAYBY12 . MODULE_PAYMENT_LAYBY_TEXT_DESCRIPTION); } function process_button() { global $HTTP_POST_VARS, $order, $currencies; $process_button_string = tep_draw_hidden_field('payment', $currencies->price()); return $process_button_string; } function before_process() { return false; } function after_process() { return false; } function get_error() { return false; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_LAYBY_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { 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 Lay-by Module', 'MODULE_PAYMENT_LAYBY_STATUS', 'True', 'Do you want to accept Lay-by payments?', '6', '1', '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, date_added) values ('Make Payable to:', 'MODULE_PAYMENT_LAYBY_PAYTO', '', 'Who should payments be made payable to?', '6', '1', 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 of display.', 'MODULE_PAYMENT_LAYBY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '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 ('Payment Zone', 'MODULE_PAYMENT_LAYBY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', '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, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_LAYBY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_LAYBY_STATUS', 'MODULE_PAYMENT_LAYBY_ZONE', 'MODULE_PAYMENT_LAYBY_ORDER_STATUS_ID', 'MODULE_PAYMENT_LAYBY_SORT_ORDER', 'MODULE_PAYMENT_LAYBY_PAYTO'); } } ?> I'm struggling with the code at around line 59 (trying to define $EMAIL_LAYBY12). My guess is that I'm just interrogating the wrong variable, but I've no idea which one I should touch. I'm pretty sure I'm grasping at straws with the $_SESSION variable. I'd appreciate any help! Cheers, Max
  6. Hi DJ, This didn't produce an output - however, here's something interesting. Recalling something I'd read in an earlier post about replacing 'require' statements with 'include' statements, and that doing this had fixed some other problem I'd experienced with this contribution, I did the same in edit_orders_ajax.php. And voila! IT WORKS!!!!!!!!!!!!!!! Maxxxie is a happy girl :) Yippeeeee!!! One last thing - when I turn off Ajax and use IE to edit the order, I still get the problem of the missing Update button. However, my care factor for this right now is approximately zero :) DJ, your assistance has been very much appreciated. I can't remember the last time I encountered someone who was so responsive with troubleshooting their contribution :D Max
  7. Hi DJ, The local value of register_globals is on. Cheers, Max
  8. An update. I switched AJAX off again, and now in Firefox I see the "Update" button. It is definitely not there in IE. Bloody IE!!!! I can now change quantities and delete items, click Update and it works. Yippee! I'd still like to resolve the IE/update button and IE and firefox/AJAX problem though. I'd welcome any suggestions :) Max
  9. Server settings for register_globals is off, however there is an entry in /.htaccess as follows: #<IfModule mod_php4.c> php_value session.use_trans_sid 0 php_value register_globals 1 #</IfModule> osC works correctly without the use of the register_globals patch - my assumption is that this setting in .htaccess overrides the server setting. I just checked the .htaccess in the /admin folder and all of this had been commented out. So I replaced it with the text above, but still get no joy. Cheers, Max
  10. Hi DJ, I'm running 4.4.4, on Apache 2.0.54 (Linux Fedora core). Cheers, Max
  11. Hi DJ, Here's what happened: When I clicked the "edit" button to go to the edit_orders.php: When attempting to change the quantity of an item: When attempting to delete an item: The error relating to 'cursor' also appears in my default installation of osC. I hope this is helpful - on the face of it, there seems to be some problem with CSS, but I don't know if it is related to this particular problem. Thanks for all your help :) Max
  12. Hi DJ, This happens with IE6 (Windows XP SP2) and with Firefox 2.0.0.6. No errors are apparent, Javascript or otherwise. I'll re-try the install again today and will let you know how I go. I'll also do an install on a clean copy of osC, just to make sure there's no other contributions messing with it. Cheers, Max
  13. Here's what I have: function updateOrdersField(field, value) { createRequest(); var url = "edit_orders_ajax.php?action=update_order_field&oID=50&field=" + field + "&new_value=" + value; xmlHttp.open("GET", url, true); xmlHttp.onreadystatechange= function(){if(xmlHttp.readyState!=4)return;if(xmlHttp.status==200){rewriteDiv(xmlHttp.responseText, 'orders')}}; xmlHttp.send(null); } //end function updatOrdersField RE your subsequent post - I've done it a few times over now, but will repeat it again when I get home tonight. Cheers, Max
  14. Just one more thing. I switched the AJAX stuff off, just to see if that's the problem. Now when I go into the order editor, there's instruction to click "update" to save all changes. Except there is no "update" (button or plain old link) to click. ARGGHH! Have I missed something? Have I done something dumb (entirely possible)? Max
  15. Hi DJ, If I refresh the page, I get the original order editing screen, complete the with the item(s) I just removed. In other words, it's as if I'd done nothing at all. This also happens when modifying quantities. I really like the idea of this contribution, and can't wait to start using it. Thankyou for all your help with it :) Max
  16. Just an addendum to my last post, adjusting the quantity of an item also produces the same behaviour - the postage quote section disappears as does the subtotal section. Max
  17. I suspect it's an issue with the AusPost shipping module. I'm using a module similar to yours (though probably an older version, I see in other threads you're using version 3.x). You can see from my screenshots in an earlier post that I'm not experiencing this strange behaviour. Does it display strangely during the checkout process as well? Or just in Order Editor? Cheers, Max
  18. Hi DJ, and thankyou for a great contribution! I'm in the middle of testing it on my dummy store and have encountered this problem as well. All I've done here is removed an item from the order. Here's a before and after screenshot. Now you see it: Now you don't: The shipping quote part disappears, as do the subtotals and the ability to add a product. I know sweet bugger-all about AJAX, so have no idea where to start troubleshooting. Cheers, Max.
  19. Hey Bozmium, sorry I didn't reply earlier - I've been travelling and haven't had time to even look at these forums. Guess what - that sorted it! Thanks very much! :D But of course, I have to wonder now what effect disabling the redirects has. My understanding is that it exists for stores that had been spidered prior to installation of Ultimate SEOs - so that the old sitename.com/products_info.php?products_id=12345 that was in the search engine index would be re-entered in as the proper sitename.com/product-name.html entry. Is there any harm in leaving the redirects off? Or is the preferred method to have the redirects on (and to fix whatever has broken the buy now code)? Cheers, and thanks once again, Max
  20. Hi guys, I'm having problems with the "buy now" button, but only with certain contributions. I've trawled through this thread and others but can't find an answer (or maybe after the 100th page, my eyes glazed over and I missed it). I've installed Ultimate SEO URLs - 2.1d with optional Admin settable Product and Category URLs(http://www.oscommerce.com/community/contributions,2823) as uploaded by yesudo on the 29th of November 2006. All works great in terms of conversion to nice URLs. However, I am having some problems getting it to co-operate with a couple other contributions. These are the "star products" (http://www.oscommerce.com/community/contributions,2255) and "X-Sell v2-MS2" (http://www.oscommerce.com/community/contributions,1415) contributions. Both these contributions use the "buy now" button. The "star products" contribution plonks a box onto the site's main page with a blurb about the product and a buy now button. Clicking the buy now button correctly adds the product to the cart, and takes you to the cart to see the added product. However, clicking on the "continue shopping" button here results in the browser sitting and waiting. IE sits forever, and firefox does eventually produce this: "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." At first I thought it was something I'd done, as I've heavily customised my site. So I decided to set up a completely vanilla site (http://test.maxxxie.net) with the standard osC installation, followed by ultimate SEOs then star product. The same problem occurs. It attempts to return the shopper to a link such as http://test.maxxxie.net/index.php?osCsid=6...;products_id=23 - which never goes anywhere. I've noticed that the x-sell contribution produces this type of link as well (I've not installed x-sell on the test site BTW, just star products). My solution thus far has been to remove the buy now buttons from both contributions until this is resolved, but I don't see this as a permanent fix. I did try scotspaul's idea (see the x-sell link) but it didn't help. Can anyone give me some guidance on this? I'm just about ready to tear my hair out! Max
  21. It will give you double entries. The best method is to use a manager such as phpMyAdmin (most hosts provide this as part of their offering) to modify the existing records. Open phpMyAdmin and click on the "configuration" table. Select the "browse" option - this will let you see the content of the table as it is. If this is your most recent change, you'll find the relevant entries at the end of the table. Find the entries that refer to D_METATAG_SHOW_MODEL_INTITLE and D_METATAG_SHOW_MANUF_INTITLE. You'll see a field called "configuration_id" to the left. Note these down. For the sake of this example, let's assume the configuration_id for the model_intitle record is 100 and for the manufacturer is 101. Now, click on the SQL button - this will take you to an interface where you can enter the SQL commands directly. Use the following commands: UPDATE `configuration` SET `configuration_description`='This includes or excludes the model number from the title.' WHERE(`configuration_id`='100'); UPDATE `configuration` SET `configuration_description`='This includes or excludes the manufacturer name from the title.' WHERE(`configuration_id`='101'); Be sure to replace the 100 and 101 with whatever your actual configuration_id values are. And of course, back up, back up, back up before making any changes to your database! I hope this helps :) Max
  22. I've just downloaded and installed version 1.6, and it works pretty well. I did have some minor issues with it, and I hope that the following acts as a workaround for others. I wouldn't classify it as a long-term fix, but it does resolve the problem. First, the SQL that comes with 1.6 includes the following: INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Show Model in Title ?', 'D_METATAG_SHOW_MODEL_INTITLE', 'true', 'D_METATAG_SHOW_MODEL_INTITLE', 9999, 100, '0000-00-00', '2007-02-01', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Show Manufacturer in Title ?', 'D_METATAG_SHOW_MANUF_INTITLE', 'true', 'D_METATAG_SHOW_MANUF_INTITLE', 9999, 100, '0000-00-00', '2007-02-01', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); That's cool if you really don't like the GUI making sense, but if you're anything like me and like a GUI that makes sense, change it to: INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Show Model in Title ?', 'D_METATAG_SHOW_MODEL_INTITLE', 'true', 'This includes or excludes the model number from the title', 9999, 100, '0000-00-00', '2007-02-01', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('', 'Show Manufacturer in Title ?', 'D_METATAG_SHOW_MANUF_INTITLE', 'true', 'This includes or excludes the manufacturer name from the title', 9999, 100, '0000-00-00', '2007-02-01', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'); The admin interface includes an option (alluded to above) which lets you change whether or not the title includes the osC product code and manufacturer. But the underlying code never actually queries for this value, so it gets ignored. No matter the value, it will always include these two things. A quick and easy fix is to modify the includes/languages/english/meta_tags.php file, replacing the following: # Show Model in Title // for version 1.6 : moved to admin -$show_model_in_title = false; # no ' or " $show_model_in_title = D_METATAG_SHOW_MODEL_INTITLE; # no ' or " # true or false # Show Manufacturer in Title // for version 1.6 : moved to admin -$show_man_in_title = false; # no ' or " $show_man_in_title = D_METATAG_SHOW_MANUF_INTITLE; # no ' or " # true or false with: # Show Model in Title // for version 1.6 : moved to admin -$show_model_in_title = false; # no ' or " // $show_model_in_title = D_METATAG_SHOW_MODEL_INTITLE; # no ' or " $show_model_in_title = false; # no ' or " # true or false # Show Manufacturer in Title // for version 1.6 : moved to admin -$show_man_in_title = false; # no ' or " // $show_man_in_title = D_METATAG_SHOW_MANUF_INTITLE; # no ' or " $show_man_in_title = false; # no ' or " # true or false Just set the values true or false as you wish. The reason I consider this a workaround, and not a fix, is because the code really should not refer to the language files for these values, but rather to the database entries that the GUI tweaks. Still, it's something you'll likely only change once, and it does the job.. so there you go. I hope this helps people out. As always, keep a backup of any file you change, I'm not a programmer, just an osc user, all done at your own risk etc etc :) Max
  23. Urgh, talk about me posting in the wrong thread. Oops. :blink: Of course, it was meant to go into the Star Products support thread. My bad. Max.
×
×
  • Create New...