Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ztwistbooks

Pioneers
  • Posts

    27
  • Joined

  • Last visited

Everything posted by ztwistbooks

  1. Is there any way to use this module to get quotes for USPS Priority Mail Regional Rate Boxes? See http://www.usps.com/shipping/regionalratebox.htm. This is essentially Priority Mail, but with zone pricing, so that nearby shipments are cheaper. Note that they also use different size/shape boxes, for some reason.
  2. Gah, there doesn't seem to be an "edit" button on this forum. This is a modified 2.2 install, if that matters. In other news, the un-install instructions (for old Security Pro) are wrong. This line: DELETE FROM configuration_GROUP WHERE configuration_group_title = 'FWR Security Pro'; should be: DELETE FROM configuration_group WHERE configuration_group_title = 'FWR Security Pro';
  3. I removed the old Security Pro and installed the new one. It works fine on the search string. It does not cleanse the Full Name, E-Mail Address, and Enquiry fields of the Contact Us (catalog/contact_us.php) page. My PCI Compliance scanner says that these pages represent a Cross-Site Scripting risk, as whatever you type in comes back pre-filled in the forms. E.g., if you type "[w](o)%3Cr%3Ek|i*n^g" in as your e-mail address, the page comes back with an error message saying "Your E-Mail Address does not appear to be valid - please make any necessary corrections." The e-mail address still has "[w](o)%3Cr%3Ek|i*n^g" in it. More to the point, "<script> comes right back. Is there a way to make this cleanse the input, or else is there a way that I can explain to my PCI scanning service that there is not a risk of a cross-site scripting attack here?
  4. You probably don't have to do anything with Swedish. I didn't. Ok, seriously. This is what you do: Start PhpMyAdmin. This is a Web-based utility for manipulating databases. Talk to your hosting provider if you need help starting it. There's a column on the left that lists your databases. Click on the one for the database associated with your shopping cart. If you don't know the name, you can find it in your catalog/includes/configure.php file. So, if you see a line like "define('DB_DATABASE', 'gtd_oscomm');" there, you want to click on "gtd_oscomm". The information for your database will pop up. You should get a list of all the tables in your database. If you don't, click on the tab with the "Structure" label. You want to edit the structure of the "configuration" table. Find it. It should be about #8 in the list of tables. Click on the "Browse" icon or the size link for that table. A list of eight fields will pop up. One of them is the "set_function" field. Click on the "Change" icon (looks like a pencil) for set_function. A list of the attributes for the field will pop up. Set the "length/values" attribute to 1020. According to information here, you may also need to change the "type" attribute to "varchar" or "text". Click the "Save" button. Hope this helps!
  5. Yes. It's actually broken at the moment. The USPS is feeding something like this out their API: Media Mail&lt;sup&gt;&amp;reg;&lt;/sup&gt; When, really, they want: Media Mail<sup>®</sup> To make "Media Mail®" It looks like they fed it through their HTML-ifier two times too many. Ech. Anyway, I just got off the phone with the US Postal service. They say they are aware of the issue and will fix it by the close of business today (Sunday, January 2). They also said that they were aware of the International rates issue, and would fix that, too. It sounded like it was related. I was less convinced. If you're desperate enough to take international orders today, I'd recommend implementing some sort of flat rate shipping module until the USPS straightens this out. Those modules are not dependent on the USPS API. They work well for USPS Priority Mail, which is probably what you want for international orders, anyway. You'll have to put in the prices manually, but that's not hard.
  6. Yes. The USPS is feeding something like this out their API: Media Mail&lt;sup&gt;&amp;reg;&lt;/sup&gt; When, really, they want: Media Mail<sup>®</sup> To make "Media Mail®" It looks like they fed it through their de-HTML-ifier two times too many. Ech. Anyway, I just got off the phone with the US Postal service. They say they are aware of the issue and will fix it by the close of business today (Sunday, January 2). They also said that they were aware of the International rates issue, and would fix that, too. It sounded like it was related. I was less convinced. If you're desperate enough to take international orders today, I'd recommend implementing some sort of flat rate shipping module until the USPS straightens this out. That's not dependent on the USPS API.
  7. Thank you for your response. Maybe I'm using QBXML wrong, but it appears to just be a connector to QB. In any case, what version of QBXML are you using? Maybe I could use the same version. The "CA2.0" in the XML file seems to imply that it works with a Canadian version of QB or QBXML. I'm in the US and using a US version of QB 2009 Pro. I think that matters. I think that this is an incompatibility with the XML file and my version of QuickBooks. The tables are fine. The problem a typo in the install.txt file. Download the zip file and look. The error is there. I fixed the typo with a text editor. Problem solved. It should be fixed in install.txt, though. I didn't have a problem with that. Those seem to map fine. The problem was elsewhere. When you go to order_export.php, there's a field "For comma-separated status IDs [ ]". The status is something like "Shipped", "Pending", "Back Ordered", or whatever. However, you need to put in the *index* for one or more of those status, which is going to be something like 5 (for Pending). I eventually figured that out, but I had to look in the database to get the right index. Anyway, I can generate the XML file. My only problem now is that I can't convince my versions of QuickBooks / SDKTestPlus to accept the XML file. I have no idea how to do this. Any suggestions?
  8. Right. The answer is to put "5" in the input field, not "Shipped". Obviously. Because "5" the ID number for Shipped. I had to look it up in the DB. Now it's kicking out an XML file. Now, SDKTest Plus 3 is trying to import the file, but it's telling me: "The version of QBXML that was requested is not supported or is unknown". This is for QuickBooks Pro 2009. I whipped out Notepad and changed the <?qbxml version="CA2.0"?> to <?qbxml version="2.0"?>. Well, now the error I get is: -2147220480 QuickBooks found an error when parsing the provided XML text stream. Any ideas now?
  9. Oh, and I put "Shipped" (without the quotes) in the box that asks for the order status, I get this: 1054 - Unknown column 'Shipped' in 'where clause' select * from orders o, orders_total ot, customers c where o.orders_id >= 5000 and o.orders_id <= 5010 and o.orders_status in (Shipped) and o.customers_id = c.customers_id and ot.class = 'ot_shipping' and ot.orders_id = o.orders_id and o.currency = 'USD' That doesn't seem right.....
  10. Contribution at http://addons.oscommerce.com/info/3384 is giving me some problems: It's asking for Currency mapping. I don't have any currencies in Quickbooks, and there was no option to export them. It's asking for tax code mappings. I *do* have tax code mappings in Quickbooks, but they aren't showing up. Maybe there's some way to make a manual entry in the DB? Any attempt to export just produces an error XML file with no suggestions: <?qbxml version="CA2.0"?> − <QBXML> <QBXMLMsgsRq onError="continueOnError"/> </QBXML> Well, that's not helpful. Any suggestions? I *was* able to map products and groups.
  11. I have a couple of "products" that are actually groups. You order one, and you're actually ordering a set of products. QuickBooks is set up for these groups, but MyQBI doesn't seem to know anything about them. How can I import these?
  12. This message shows up for any error. The usual cause of this problem is that you have not asked the postal service to move your account to production. The test server doesn't work at all, for anything.
  13. Sadly, the above method isn't good enough. When the user hits the "continue" (submit) button, it calls the quote function again. This time, though, it only uses one shipping method. That one is obviously the lowest price, so the it goes to zero every time. Ouch. Any ideas on how to fix that? I need some way to carry the "cheapest" value through the submit button. I don't know much about Web programming. Maybe there's some sort of session variable I can save it in?
  14. This was not enough for my installation. It looked good on the first checkout screen, where you select your shipping type. However, on the checkout confirmation, it came up with the wrong shipping type (I had three options). I did a search and replace of *ALL* "Priority Mail Flat-Rate Box" to "Priority Mail Medium Flat Rate Box". That fixed it.
  15. How do I split the order into differently-sized boxes differently for different shipping methods? If the customer selects Media Mail or (plain) Priority Mail, I can use boxes that hold up to 26 pounds each. If the customer selects Flat Rate Priority, I have to use the USPS boxes, which hold up to 10 pounds each. Obviously, I would need more of these smaller boxes. I have to have these available, as they are the only reasonable way to do certain international shipments. They are also much cheaper than regular priority mail for certain cross-country domestic shipments when the box is near full. Entering the box capacity on the Configuration->Shipping/Packaging item seems to be the only thing that affects how shipments get split up into packages. However, it splits it the same for all shipping types. Enter the package sizes for different kinds of Flat Rate Priority Mail seems to just act as a filter to determine when orders will show. It does do any splitting based on the size.... I can set the maximum weight small, to handle the Flat Rate boxes properly, but then it splits up the media mail and (regulary) Priority Mail shipments into multiple packages, when it's really going into just one box. What to do? Maybe use the separate Flat Rate Priority Mail module and modify it? (Side note: I'd like to automatically choose either Flat Rate Priority or regular Priority, depending on which is cheaper, but that's another battle.)
  16. I ended up doing this myself by modifying the USPS Methods module. First, I changed most of the occurrences of "usps" to "dusps". I don't know if there would be conflicts with the regular USPS module, but I didn't want to find out. Then, I inserted code to find the lowest-price shipping option, then subtract that price from all the prices. So, the lowest-cost price drops to zero. Here is the relevant change from the modfied usps.php module: $duspsQuote = $this->_getQuote(); if (is_array($duspsQuote)) { if (isset($duspsQuote['error'])) { $this->quotes = array('module' => $this->title, 'error' => $duspsQuote['error']); } else { $this->quotes = array('id' => $this->code, 'module' => $this->title . $shiptitle); $methods = array(); $size = sizeof($duspsQuote); // vvvvvvvvvvvvvvvvvvv DISCOUNTED USPS vvvvvvvvvvvvvvvvvvvvvvv // Find the cheapest method $cheapest = 1000000000; for ($i=0; $i<$size; $i++) { list($type, $cost) = each($duspsQuote[$i]); reset($duspsQuote[$i]); $cheapest = (($cost < $cheapest) ? $cost : $cheapest); } // error_log("Cheapest is ".$cheapest); // ^^^^^^^^^^^^^^^^^^^ DISCOUNTED USPS ^^^^^^^^^^^^^^^^^^^^^^^ for ($i=0; $i<$size; $i++) { list($type, $cost) = each($duspsQuote[$i]); // error_log("Type $i is $type. Cost $i is $cost."); $title = ((isset($this->types[$type])) ? $this->types[$type] : $type); if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_DUSPS_OPTIONS))) $title .= $transittime[$type]; if (MODULE_SHIPPING_DMSTC_INSURANCE_OPTION == 'Force Insurance') { $methods[] = array('id' => $type, 'title' => $title, // vvvvvvvvvvvvvvvvvvv DISCOUNTED USPS vvvvvvvvvvvvvvvvvvvvvvv // 'cost' => ($cost + $insurance + $handling_cost[0]) * $shipping_num_boxes); 'cost' => ($cost - $cheapest + $insurance + $handling_cost[0]) * $shipping_num_boxes); // ^^^^^^^^^^^^^^^^^^^ DISCOUNTED USPS ^^^^^^^^^^^^^^^^^^^^^^^ } else { $methods[] = array('id' => $type, 'title' => $title, // vvvvvvvvvvvvvvvvvvv DISCOUNTED USPS vvvvvvvvvvvvvvvvvvvvvvv // 'cost' => ($cost + $handling_cost[0]) * $shipping_num_boxes); 'cost' => ($cost - $cheapest + $handling_cost[0]) * $shipping_num_boxes); // ^^^^^^^^^^^^^^^^^^^ DISCOUNTED USPS ^^^^^^^^^^^^^^^^^^^^^^^ } } $this->quotes['methods'] = $methods;
  17. The Install and Remove buttons create (or remove) configuration options in the database.
  18. If the USPS has your production server enable, and you've put in the user name and password they gave you, and you've set your server to production, the next thing to do is to check your Web server's error logs.
  19. While I don't know PHP, I've done a lot of programming, and it looks a lot like perl, so I can figure that out without difficulty. What I need to know is the general structure of a module and the store as a whole...how all the parts work with each other. Yeah, I could wade through all the code and figure it out, but that's slow and error-prone. In short, I want to provide media mail as free shipping. If the customer selects USPS priority mail, they should only have to pay the difference in price between media mail and priority mail. So... I want to write a new module for the discounted priority mail shipping. It should use (presumably existing) modules to calculate the media mail and priority mail prices, and subtract one from the other. This leaves a lot of questions: How do I use an existing shipping module to extract the price? It seems like there would have to be a function in a standard format for this.... What interface functions does the shipping module class have to provide? What is their format? What are their purposes? When do they get called? How does the Web site know it's there? I might have to set up some database tables to hold things like shipping prices for various weights and distances. Is there a standard format for doing that? I'll need to change them as prices change. What's the right way to set up a configuration interface in the admin section to manipulate these tables? Other than the main class, these modules invariably have the modification of lots of other files for the Web store. Why can't it all go in the module? Some of them seem to add general-purpose functions to the PHP libraries...why not include them in the module? Etcetera, etcetera. There's a lot to figure out.... OSCommerce has been around a long time. I'm hoping someone who has written modules has explained how to do that.
  20. This is pretty basic, but I've looked all over, but I can't find instructions on how to write a module for OSCommerce. I need a new shipping module. The existing ones don't do what I need. Where do I find directions on how to write a module? I could go through all the PHP code and figure it out, but it would be much faster if the structure is all explained somewhere. Plus, I would know that I'm doing it right. Does anyone have a pointer to any kind of documentation? Tutorial? Anything?
  21. Ok, I could use some hand-holding here.... We ship books, either USPS Media Mail or USPS Priority Mail. If the customer wants Media Mail, it's free. If the customer wants Priority Mail, subtract the Media Mail price from the Priority Mail price, and charge the difference. Example: The actual cost of shipping Media Mail is $1.50. The actual price of shipping Priority Mail is $4.60. If the customer chooses Media Mail, it's free. If the customer chooses Priority Mail, it's $3.10. Any hints on how to do this? Note: I'm a competent programmer, but I don't know my way around OS Commerce. If I have to program a module for this, I'll need pointers on where to start.
  22. My business ships stuff in both flat rate envelopes and flat rate medium boxes. When there's an order that will fit in an envelope, the module also gives the option to ship it in the (much more expensive) medium box. That's silly. I just want it to show the envelope, which is the cheaper option. Show me the box for bigger orders only, please. How do I make it do that?
  23. Ok, I figured that out. I had to use the OSCommerce core configuration to set a low enough maximum package weight and zero out the Tare weight. New problems, then: It's pretty unintelligent about which boxes it selects. Using boxes and envelopes, I'd like it to select the big boxes for most of the order, then use envelopes for the little bit left over. Is there any way to do that? Also, I don't want to give the customer a choice of which boxes and envelopes to use. I just want it to tell the customer what he'll be getting and what the price will be. Any way to do that?
  24. The module states that it can handle multiple boxes/envelopes. When I put in an order that uses multiple boxes, though, it doesn't work. There are no options presented under the shipping method. Clicking on the continue button just cycles back to the same page instead of continuing with the checkout process. The patch notes for 1.1 state: "* Added the ability to quote the correct amount if multiple shipping boxes are to be shipped for 1 order". Any ideas?
×
×
  • Create New...