Jump to content

sukotto

Members
  • Content count

    19
  • Joined

  • Last visited

Profile Information

  • Real Name
    Scott Chang
  1. anyone have any new insight to this problem? It's been over a month.
  2. Need someone to help, please. Is the non-object error referring to soemthing in line 57 itself, or is it something in get_tax_rate function in general.php, or is it something in the tax.php itself when it does the calculation?
  3. I am getting an error when I use the optimized also purchased contrib with the optimized get_tax_rate contrib. What is happening is that when a customer views an item, below the item description is a "also purchased" infobox. The error message that appears is "Call to a member function on a non-object... on also_purchased_products.php line 57" Here is the code in that section: define('USE_STOCK_OSC', true); if (isset($HTTP_GET_VARS['products_id']) && USE_STOCK_OSC === true) { $orders_query = tep_db_query("select p.products_id, p.retail_price, p.products_price, p.products_tax_class_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_ordered = tep_db_num_rows($orders_query); if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) { ?> <!-- also_purchased_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_ALSO_PURCHASED_PRODUCTS); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($orders = tep_db_fetch_array($orders_query)) { $orders['products_name'] = tep_get_products_name($orders['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . $orders['products_name'] . '</a><br>Retail price: $<strike>' . $orders['retail_price'] . '</strike><br><font color="ff3333">Your cost: </font>' . [code]$currencies->display_price($orders['products_price'], tep_get_tax_rate($orders['products_tax_class_id']))); Starting from where it begins 'text' => , to the end, is the entire line 57. I've narrowed it down to the currencies->display_price($orders['products_price'], tep_get_tax_rate($orders['products_tax_class_id']))); part, especially the tep_get_tax_rate function. I've taken a look at the optimized tax contrib files, but it is overwhelming to determine what is the non-object that the error message is refering to. As a temporary fix, i've replaced the problem code with $currencies->display_price($orders['products_price'], 1)); but this fix only works when I turn the cache off. When I turn the cache on, the price that it displays is blank. This is not good for me in the long run. I would like the function to determine it by looking at the database and returning the result, instead of hard writing it into the code. If I have more than one tax code, then this solution is not going to work. What does the cache have to do with this? Can someone help me figure this out? I'd like to know what the non-object that the error is refering to, what the cache has to do with this code section, and some pointers on how to fix. TIA
  4. For everyone that had the following error when using easy populate with quantity discount mod, or maybe just had the following error anyway: here's a tidbit that may help you. After searching forever, and not finding a solution in the forums, I trusted the posts by Mibble that there was nothing wrong with the code. There were posts cautioning the fact that there are many poeple who upload a easypopulate contrib, but had adjusted the variables to their own liking, and sometimes things don't work for another person. I decided to start with a brand new clean copy of easypopulate (ver 2.76.). I used a file comparer tool to compare the code. What I realized was that soem of the column listings in easypopulate_pricebreak were placed in the wrong order, or that they were placed twice in the same query. After using the file comparison tool, I copied and made sure that things were in teh right order. After doing this, I was still having errors. but this time it was because there was an unexpected $ somewhere in teh code. After searching for another few hours, I discovered that the way I had copied things over from using the file comparison tool. In the code around line 1235, after the code of $key5, I forgot to close the for argument with a }. My comparison software didn't flag it as a missing line, and it was probably just as easily have been me copying things over incorrectly the first time. This made my easypopulate working. I can now add new products to the database. I am by no means a programmer, so for me, this was a huge undertaking to fix this problem. I still dont' know the actual code that caused problems, but by starting over and taking the steps above, I solved my problem. I hope that my experience can help someone else out there trouble shoot. All I can say is, use a clean version of easypopulate, copy only the things you need, and make sure everything is in the right order.
  5. sukotto

    Official PayPal IPN Support Thread

    Yes, I am using 1.2.1. No, I haven't tried it with SSL off. By that, do you mean to edit the configure files to say SSL = False? I left everything as the "default", exept for the requisite email and file locations. The reason is that I did not see a need to change it yet, and let os commerce and IPN do it's thing, instead of overriding it by selecting a pending or shipped option. After I get everything working, I would then consider changing the values to what I need. Scott
  6. sukotto

    Official PayPal IPN Support Thread

    Here are my paypal IPN module config values: PayPal IPN Enable PayPal IPN Module True Move tax to total amount True E-Mail Address jmail1@san.rr.com Transaction Currency Only USD Payment Zone --none-- Set Preparing / PayPal Pending Order Status default Set PayPal Completed Order Status default Set PayPal Denied/Refunded Order Status default Gateway Server Testing Transaction Type Aggregate Page Style Debug E-Mail Address sukotto@san.rr.com Sort order of display. 1 Enable Encrypted Web Payments True Your Private Key /home/sukottoi/public_html/tmp/my-prvkey.pem Your Public Certificate /home/sukottoi/public_html/tmp/my-pubcert.pem PayPals Public Certificate /home/sukottoi/public_html/tmp/paypal_cert.pem Your PayPal Public Certificate ID EE8EUZ5DLNHRU Working Directory /home/sukottoi/public_html/tmp OpenSSL Location /usr/bin/openssl Also, I did some additional testing/experimenting. The working directory that I created has been given 777 permissions. (I did this in accordance to some toher threads about "fopen" errors). It still gives me the "page not displayed" error. when I go through the same test sale process on a nother machine running Firefox browser, at the same point, when i select payment method, and then click continue, the page doesn't refresh. It's as if it's just stuck there, and there's no next page to load. also, when I changed permissions to 755, or some other permissions code, when I click continue, it loads the order confirmation page, but it also gives me a whole list of "fopen" errors, and invalid strings could not be retrieved... stuff like that. That type of isse, it seems to be experienced by many other people here on the forums, but each time a question like this is posted, no one replies. sometimes, there are replies to suggest changing the permissions to 777, but the original poster responds back that it has not solved teh issue. I've read through many posts with the "fopen" symptoms and 777 permissions, but no one seems to respond to those questions (or that honestly, not a single person knows) I stumbled across another thread HERE that suggested changing some parameters. Just for kicks and giggles, I did so. Not only did my web store not load properly at all, none of the links worked, and there were maybe 20 or so popups that kept saying "certificate not recognized, do i want to continue?", etc. Being that this avenue of research did not work for me, I changed it back (with a backup copy), and the page loads properly. I made a test sale again, just to check everything, and... OMG!, it worked! I was looking at my fake paypal account in sandbox! I checked my IPN module settings, and encryption was set to "TRUE"!. On my next test sale, it FAILED, bringing me back to square one again. Sadly, I was unable to replicate the situation again. I even closed all my browsers to open new fresh ones, and made the same changes, tested, changed back to originals, tested again (all the same steps I took above), and have not replicated the one success I had above. I am a complete noob to programming, to be sure, but it seems to me that somehow it has to do with shared SSL and my public private keys that I created. It's not compatible somehow, or something. I know that someone out there has to have had this problem and overcome it, can anyone offer help? Scott
  7. sukotto

    Official PayPal IPN Support Thread

    Just to add an addendum, I am absolutely positive that I've installed this correctly, with the correct options. I even found a page that exactly spelled out what options to choose, and what to enter here. maybe it's something with the webhost? they had said I needed a merchant gateway. I don't believe so, since it seems like sooo many other people here just installed, and away they went. anyone have any insight? (see previous post for my problem) PS. my web hosting company is www.dot5hosting.com. hope this info helps someone help me! Thanks! Scott
  8. sukotto

    Official PayPal IPN Support Thread

    Hi I hope this is the right thread to ask for this module! I'm a complete noob, so answers are not obvious to me! I have been lurking on the forums for a few days now, and I haven't seen this question in any of the threads I've read. I have the os commerce paypal IPN module installed (ver 1.2.1). The issue is that when I turn on encryption in the admin console, and then make a test sale. I go to the checkout screen and select a payment method (the paypal IPN module). when i click continue, the next screen says "this page cannot be displayed". When I elect to turn off the encryption, and go through the same process, it takes me to my sandbox test account. Why is this? Can someone help me on this issue? I'm pretty sure I have all the other settings correct, I have the public and private certificates listed correctly in the admin control panel, as well as a certificate ID. I left the working directly and the openssl directory as the default values. I even backed up everything, and reinstalled os commerce, with just the IPN module, set everything up, but I run into the same error situation as described above. My webhost suggested to me that I needed a paypal merchant account. I didn't think so, but can anyone confirm this? Does anyone know how I can fix this? Thanks Scott
  9. sukotto

    PayPal IPN?

    Hi I had a similar problem, could not upload my public certificate to paypal. Being a complete noob, the reason, I found out, was because the included files in the contrib were blank. (I thought I could just use them out of the box :) ) what I did was, I deleted those files from my web directory. I generated my own keys and renamed them to the default file names (ie my-prvkey.pem) and uploaded it into my web directory. I also uploaded the renamed files up to paypal, and I was successful. HTH.
  10. sukotto

    [Contribution]Paypal IPN - Devosc

    Hi I have been lurking on the forums for a few days now, and I haven't seen this question in any of the threads I've read. I have the os commerce paypal IPN module installed (ver 1.2.1). The issue is that when I turn on encryption in the admin console, and then make a test sale. I go to the checkout screen and select a payment method (the paypal IPN module). when i click continue, the next screen says "this page cannot be displayed". When I elect to turn off the encryption, and go through the same process, it takes me to my sandbox test account. Why is this? Can someone help me on this issue? I'm pretty sure I have all the other settings correct, I have the public and private certificates listed correctly in the admin control panel, as well as a certificate ID. I left the working directly and the openssl directory as the default values. I even backed up everything, and reinstalled os commerce, with just the IPN module, set everything up, but I run into the same error situation as described above. My webhost suggested to me that I needed a paypal merchant account. I didn't think so, but can anyone confirm this? Does anyone know how I can fix this? Thanks Scott
×