Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

goodolandy

Pioneers
  • Posts

    25
  • Joined

  • Last visited

Posts posted by goodolandy

  1. Hello Pronux,

     

    I first want to say that I think your script is a great add-on for anyone doing e-commerce and should be an already built in feature. I have not yet fully tested it but so far it is looking great.

     

    I just wanted to pass along a feature that would be nice to have incorporated in to SHP, the allowing of using customer names OR customer groups. I also have the add-on "Separate Price Per Customer" installed which allows the creation of user groups so it would be nice to choose groups instead of each individual user.

     

    I would even be willing to try and incorporate it myself but I am not a PHP expert so I am not exactly sure which code and in which file I would need to edit.

     

    Anyways, keep up the great work.

     

    Andy

  2. Well this SHOULD be fairly simple, that line is repeated somewhere above it. If it is not, not so simple anymore, that would mean that for some reason when the code is trying to look up the shipping modules, something is causing it to load that page twice.

     

    Check the repeating possibility first and see what you find, Craig :)

     

    There is no repeat HOWEVER I did go back and re-read the module.txt file just in case I had missed something...I did. After making this file I went a head and put a copy of it both under includes/modules/vendor_shipping and includes/lanuages/english/modules/vendor_shipping when I only needed to have it in the first while having the original in the second.

     

    After putting the original under the languages folder I now see the entire list of shipping options but with Warnings messages.

     

    At the very top of the list I receive;

     

    Warning: constant(): Couldn't find constant MODULE_SHIPPING_CANADAPOST_ZONE_1 in /includes/modules/vendors_shipping/canadapost.php on line 85

     

    The other warnings are listed next to each shipping option twice but goes away when I click on the install button to the right;

     

    Warning: constant(): Couldn't find constant MODULE_SHIPPING_FEDEX1_SORT_ORDER_1 in /includes/modules/vendors_shipping/fedex1.php on line 120

     

    Again, I have compared line 85 in the canadapost.php to the fedex1.php and again, do not see anything out of place.

     

    Should I maybe post the canadapost.php file I put together using the instructions in module.txt in case someone following this thread is able to see an error?

     

    I did get myself a book on PHP but it really isn't helping.

     

    Andrew

  3. Hello again, I seem to have almost everything working now except when I click on "Manage" in the Venor Manager admin menu.

     

    I get the the error:

     

    Fatal error: Cannot redeclare class in includes/modules/vendors_shipping/canadapost.php on line 20

     

    That code is:

     

    class canadapost {

     

    I compared the canadapost file I did per instructions from module.txt to fedex1.php and it had basically the exact same line only instead of canadapost it's fedex1.

     

    Andrew

  4. Looking at your picture Andrew, I would suggest dumping this file and starting again. You seem to have more than just a bracket out of place. Your HTML tables are messed up as well.

     

    Are you working with a file comparison tool as well? I have found it critical to my work. I use Winmerge, there are links in the MVS instructions I think, and it is free and very powerful. It may help with the modifications you need. It can also be valuable as a troubleshooting tool. Comparing the modified file with the original version can often lead right to the culprit.

     

    Keep at it, Craig :)

     

    My categories.php is not the standard file because part of the Canada Post add-on is to modify this file so when adding the MVS entries, I made sure not to remove the lines of code for the Canada Post module.

     

    Andrew

  5. Andrew,

     

    Not sure what program you are using to edit your PHP with, but the program I use will highlight the opening and closing braces pair when you select one of the braces. This is a HUGE help in finding where the missing one might be at. As you have noticed there can be many nested brace pairs, and placing one in the wrong place will create all sorts of havac! I can vouch for this, as I too was once in your shoes - didn't know a lick about PHP. But over the past two months of installing contributions, understanding how things are put together, and a bunch of help from the wonderful osCommerce community on these forums, I have successfully installed over 70 contributions on my site (including multi-vendor shipping) and have it all (hopefully ;) ) working.

     

    If your editor highlights the braces, I usually start with the last closing brace in a section of code, and see if the corresponding open brace is where it should be (this takes some practice of knowing where it should be) - usually after an IF statement or the like. Then I work my way up through the closing braces until they are all accounted for in the section of code. Typically when I have had a problem, I highlight the last brace, and there is no opening brace highlighted. That means there is one missing above it somewhere.

     

    It can be very frustrating sometimes (spent hours trying to find the problem), but when it all works you will be pleased with your accomplishment.

     

    Hang in there! :thumbsup:

     

    John

     

    Hi John, the program I use is called Programmers File Editor. I did some searching in the help and it does do something similar to what you describe only it doesn't highlight but rather takes your cursor to the other end of the code.

     

    Not sure if this will work but I thought I would // each line I was instructed to input and then remove the // from each section to find out which add-in is now causing what you see in the image above.

     

    Andrew

  6. When this happens, it usually means that there is a line that shouldn't be there, a return, some spaces, something of that nature. Sometimes it can also be a missing closing tag earlier in code. Check to make sure all of these { has on of these } to match, all tags must close.

     

    You've gotten this far, you'll get it.

     

    Craig :)

     

     

    Ok, I counted all the { and } and found 1 } missing so I went and applied it near the end of the file because I don't know where to put it and I've notice that there can be a few { before coming to any }.

     

    There error is now gone but categories is no longer displayed properly and the products are not being listed. Below is a screen shot of how the category menu is now coming up.

     

    categoryscreenshot.gif

     

    Andrew

  7. Okay, I have finished doing all the edits and I'm receiving an error in Admin when trying to visit the categories section.

     

    The error is a parse error, unexpected $ in admin/categories.php on line 1189 but when I checked the file, there is no line 1189. Total number of line is 1188.

     

    Any thoughts?

  8. Andrew: The only change that I can see in that code is the last line:
     'cost' => (SHIPPING_HANDLING + $cost));

    should change to

       'cost' => $handling + $cost));

    That looks like a complex module, so there may be more changes that aren't detailed out in the instructions. Post here if you need help with those. Oh, and please post code in code blocks (the # button above the input box.) It makes code easier to read.

     

    As to PHP syntax, that's a complex subject. Basically, every line of code needs to end with a semicolon. The interpreter ignores line endings otherwise, so a "line" of code can span many lines of text in the file. It's often easier to read if you spread things out a bit, especially complex code like arrays and SQL commands. The braces {} surround the code that is executed by a conditional or loop (If, While, For, etc.) There should be a semicolon after the closing brace, but PHP doesn't care if you leave it off so most of us ignore it.

     

    I can't give you any recommendations on books because I don't learn code that way. Just give me the reference manual and some code to play with and I'll figure it out. I learned what I know of PHP by looking at osCommerce and other open source code and looking things up in the reference. It all depends on how each person learns best: some need classes, some get it from a book, and a few of us learn best by just doing it.

     

    Regards

    Jim

     

    Thanks Jim, I'll keep that # sign feature in mind for future code postings. I kind of figured that all I would have to change was what you mention but coming so something that different from what is in the instructions kind of through me back.

     

    I've also been trying a bit to understand the different PHP commands while running a personal website using PHP Nuke but I do need to get myself a nice simple book for reference. I've checked my local library but those books which are not lost are written as if the reader is already above the basic learning level.

     

    I'll keep working at the script and see how far I can get with it. :)

  9. As far as I know, noone else has worked on the CanadaPost module. If you get it working post what you get, as usual, IF I get the chance, I will look at it.

     

    Good luck, Craig :)

     

    I'll keep working on it but my PHP knowledge is below basic, in fact all I know is that every line seems to have to end with a ; or { and I'm not sure why.

     

    I guess I should try and find myself a PHP for Dummies book. :D

  10. Hello everyone, I am currently trying to install this module on my site and I was following the module.txt file. Everything was going good until about half way down the instructions.

     

    The shipping module I'm trying to edit is the Canada Post 3.7 rev1 and I'm stumped at the following point in the module.txt file;

     

    Now look for code similar to this:

     

    ---------------------------------------------------------------------------------------

    $this->quotes = array('id' => $this->code,

    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE,

    'methods' => array(array('id' => $this->code,

    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,

    'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));

     

    In the Canada Post module, the code is not like the above, infact only the top two lines are similar. Here is what is in the canadapost.php file;

     

    $this->quotes = array('id' => $this->code,

    'module' => $this->title . ' (' . $this->boxCount . MODULE_SHIPPING_PACKAGING_RESULTS . ')');

    $methods = array();

    for ($i=0; $i<sizeof($canadapostQuote); $i++) {

    list($type, $cost) = each($canadapostQuote[$i]);

     

    if ( $this->cp_oniline_handling == true) {

    if ( $method == '' || $method == $type ) {

    $methods[] = array('id' => $type,

    'title' => $type,

    'cost' => $cost + $this->handling_cp);

    }

    } else {

    if ( $method == '' || $method == $type ) {

    $methods[] = array('id' => $type,

    'title' => $type,

    'cost' => (SHIPPING_HANDLING + $cost));

     

    Has anyone been able to edit this module properly so it can work with the MVS module?

     

    I proceeded to the next step but it too I can not do because of the major differences between the module.txt and the canadapost.php file.

  11. Just went through this entire thread but no ones has seem to have had the problem I'm now having.

     

    Do to stupid me deleting a certain table, I had to re-install my cart from scratch. I now have everything back the way it was except this time around the FAQ Desk is not working.

     

    When I'm in admin and choose to add a new question, I received the following error under the heading "Short Answer":

     

    Warning: main(includes/modules/faqdesk/html_editor_images/summary_bb.php): failed to open stream: No such file or directory in /admin/faqdesk.php on line 548

     

    I checked the FAQ Desk files and notice that in the package there was no html_editor_images directory or summary_bb.php file so why would that directory and file be listed in faqdesk.php?

  12. Hello everyone, first there has been some posts from people saying things were not being subtracted from the final total. What I did to solve that problem was make Total sort order 800.

     

     

     

    Now I am still having a problem, one that I keep getting with every single version of the contribution and that is orders not being listed in admin>customers>orders

     

    Has anyone figured out this problem yet?

  13. First Tanya, don't expect to see a reply to the question of why 5.03 causes the orders not to show up in admin. The question has been asked numerous times and no one has given an answer. Must be a mystery that no one can figure out. :-)

     

    I do have two other errors that hopefully someone know the answer to.

     

    The first one is with v5.0. I copied the proper items over and would received an error pertaining to the following line:

     

    $payment_modules->update_status();

     

    That line is in my checkout_confirmation.php file around line 51. The error had something to do with update_status so I put // in front of the line and everything seem to be working fine.

     

    What is that line and is it really important?

     

     

    After solving that, I started to upgrade from v5.0 to v5.03. When completed I got a parse error in my checkout_payment.php file on a line that didn't even exist. The error would give say line 412 but the file only had 411 lines.

     

    Anyone know what would cause this such error?

  14. Hi everyone, I am trying to install the Credit module for an 8th time, is that is right, an 8th time. I posted a couple of messages before with no replies, hopefully someone will reply to this post.

     

    Since I could not get v5.03 to work, I decided to start with v5.0 and work my way up but I'm getting the following error during check out with v5.0.

     

    Fatal error: Call to undefined function: update_status() in /home/ibigbaby/public_html/catalog/checkout_confirmation.php on line 51

     

    Anyone have any ideas why I am getting this error?

     

    I had to copy and paste the Credit Voucher code in to my files because I already have other modules installed.

     

    For those who plan to ask me what snapshot I'm using, you'll have to tell me how to find out that information because the OSC I'm using was installed through C-Panel provided by the web hosting company I'm with.

     

    Andrew

×
×
  • Create New...