Jump to content

Cyburg

Members
  • Content count

    68
  • Joined

  • Last visited

2 Followers

Profile Information

  • Real Name
    Paul Burgess
  • Gender
    Male
  • Location
    Leicester
  1. Hi Rob, I would like to extend the functionality of your fantastic contribution so that it will produce meta tags and a canonical URL for a custom blog area of my oscommerce installation, and I wondered if you could provide some guidance please? I don't need specific instructions on what I should write in terms of code, I only need a gentle nudge in the right direction towards the files I need to edit. There is one file serving my blog content, which is rather imaginatively called blog.php. A "c" querystring appended to the URL denotes that a blog category should be displayed, "c" and "a" querystrings are displayed when an article is displayed. Having seen the files located in "/includes/modules/kiss_meta_tags/modules", I am thinking that maybe I need to clone one of those files (maybe the one for product_info.php), rename it "blog.php", and edit the contents so that it pulls values from the blog table in my database prior to calling the KissMT class? If I am on the right track, is there anything else that I need to do, or will your code automatically use the module when a visitor hits the "blog.php" page? Many thanks for any help you are able to provide, Paul
  2. Cyburg

    Automatically send data feed to Froogle

    Hi Jack, Are those instructions also included in the install text file within the latest version of the contribution? It looks like they are. Cheers, Paul
  3. Cyburg

    One Page Checkout Support

    Hi Everyone, I am now on the trail of a proper solution to the issue that I have been having with this contribution, where the value of the order totals is calculated incorrectly. There is a function supplied as part of this contribution called fixTaxes(): this function is located in the onepage checkout classs file ("catalog/includes/classes/onepage_checkout.php"). This function is called from line 60 of the file "catalog/checkout.php"; I have found that commenting out this line, and preventing the fixTaxes() function from firing, solves the problem of incorrectly calculated order totals, and they are calculated as expected. My intention is to now go through all of the code in the fixTaxes() function to find the REAL cause of this issue. I am also considering changing the name of this function in my deployment of oscommerce from fixTaxes(), to breakTaxes()!! :) Cheers, Paul
  4. Cyburg

    One Page Checkout Support

    Hi Everyone, Despite my reservations about hacking the database structure, I thought I would give it a try anyway, to see if it produced the desired results, and it did not. Even with prices truncated to two decimal places in the database the OPC code still manages to calculate and display incorrect order totals. Cheers, Paul
  5. Cyburg

    One Page Checkout Support

    Hi Steve, Sorry Steve, but it is hack. Harald designed the structure of the database with prices having four decimal places for a reason; some businesses require the extra precision in pricing that four decimal places provides. In any case, I shouldn't have to hack the database structure in order to get this contribution to calculate sub-totals correctly, as the standard oscommerce code manages just fine with the database in it's present form. Does anyone have any useful information that might help me to find a solution to this problem? Cheers, Paul
  6. Cyburg

    One Page Checkout Support

    Hi Everyone, I am having a problem with OPC which seems to have been around for several versions (we have just installed the latest version); when OPC is turned on the calculation of sub-total without tax is incorrect. The post I quote below by Sparticus suggests that changing the structure of the database to only accommodate prices with two decimal places is a fix, I however consider it to be a hack, and I do not want to alter the database structure just to make this contribution work. Has anyone ever thrown any light on why this contribution causes the order totals to be calculated incorrectly? It happens whether I am displaying product prices with tax or not; however, I have noticed that the same behaviour is not apparent on the OPC demo page (http://www.itwebexperts.com/onepagecheckout/checkout.php). Could this perhaps mean that the behaviour is something to do with the way in which the order total modules are set up in the admin panel. In the latest version the OPC code uses the same order and order_totals class as the normal checkout, making the incorrect order totals when OPC is activated a real puzzle; what is going on here? Cheers, Paul
  7. Cyburg

    One Page Checkout Support

    Hi, Carried on battling away at it, and came up with this for the missing telephone number in the order object: IN THE FILE "catalog/includes/classes/onepage_checkout.php" FIND THE FOLLOWING CODE INSIDE THE FUNCTION "processCheckout()": $onepage['customer']['telephone'] = (isset($_POST['billing_telephone']) ? $_POST['billing_telephone'] : ''); ADD IMMEDIATELY BELOW IT: $order->customer['telephone'] = $onepage['customer']['telephone']; Cheers, Paul
  8. Cyburg

    One Page Checkout Support

    Hi, Ok, I think I am just going to have to admit defeat with the remaining issues I have, and ask if anyone here may be able to help me find solutions to them: 1. I read earlier in the thread that there used to be a problem with the telephone number not being captured; I seem to be having a similar problem, but I am using the latest version of the code v1.11. If a customer account is created the telephone number IS successfully added to the customer record; however, the telephone number IS NOT added to the order record in the database. This is a big problem for us, as it means that the telephone number does not appear on our invoice and packing slips; does anyone else who is using this contribution see similar behaviour, and if so, have you found a fix? 2. I have noticed that when an order is created by this contribution, it is always given the stores' default order status; in my opinion this does not fit well with the standards provided by oscommerce. The code should use the administrator specified initial order status for the selected payment module. For example, on our stores we use an initial order status of "Pending [PayPal]" and "Pending [WorldPay]" for two of our payment modules so that we can investigate customer payment issues more efficiently; one page checkout ignores these order statuses, and just sets them with the store default of "Pending". Anyone know where the code is that needs to be changed in order to get this contribution to respect the administrator specified default order statuses during order creation? Cheers, Paul
  9. Cyburg

    One Page Checkout Support

    I was going to add this fix to the list of packages on the One Page Checkout contribution page, but as the author has chosen to not allow public uploads, I couldn't. Seems a shame that many people are likely to miss the opportunity to use this contribution fully because firstly, it doesn't work correctly, and secondly, most of those people are unlikely to find this fix in here. There are several other issue I have with the code for this contribution, and as I find fixes, I will post them here. Right, here we go....... FIX FOR ISSUE WHERE TWO CUSTOMER ACCOUNTS ARE CREATED FOR EACH ORDER WHEN THE CONTRIBUTION IS SET TO CREATE ACCOUNT The instructions for this contribution state that the following edit should be made to the file "checkout_success.php": FIND THIS: // if the customer is not logged on, redirect them to the shopping cart page if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } REPLACE WITH: /* One Page Checkout - BEGIN */ if (ONEPAGE_CHECKOUT_ENABLED == 'True'){ if (!tep_session_is_registered('onepage')){ if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } }else{ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT); require_once('includes/functions/password_funcs.php'); require('includes/classes/onepage_checkout.php'); $onePageCheckout = new osC_onePageCheckout(); $onePageCheckout->createCustomerAccount(); } }else{ if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } /* One Page Checkout - END */ I am sure that this code does not produce the results that the author intended. The effect of this code is that TWO customer records are added to the database when the admin panel controls for this contribution are set to create an account. The first customer database record is created when the customer first hits the "checkout_success.php" page, and the second is created when the customer clicks the continue button on the "checkout_success.php" page (the continue button fires a form which resubmits to the same page in order to process product notifications for the customer). The fix to this problem is simply to add another conditional which checks for the presence of a customer_id in the session variables prior to adding the customer record, since if the customer has already been added to the system on a previous iteration of the page, the session variable will be present. Rather than use the code supplied for the top of "checkout_success.php" from the latest package (v1.09), use the following code instead: FIND THIS: // if the customer is not logged on, redirect them to the shopping cart page if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } REPLACE WITH: // START: One Page Checkout v1.09 /* // PREVIOUS CODE APPEARS WITHIN THESE COMMENTS!!! // if the customer is not logged on, redirect them to the shopping cart page if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } */ if (ONEPAGE_CHECKOUT_ENABLED == 'True'){ if (!tep_session_is_registered('onepage')){ if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } else { if (!tep_session_is_registered('customer_id')) { // there is no customer identifier in the session vars so we need to create an account require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT); require_once('includes/functions/password_funcs.php'); require('includes/classes/onepage_checkout.php'); $onePageCheckout = new osC_onePageCheckout(); $onePageCheckout->createCustomerAccount(); } } } else { if (!tep_session_is_registered('customer_id')) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } // END: One Page Checkout v1.09
  10. Hi all, Tried the topic search function (there seem to be a lot of pages to this topic), but still could not find the information I need: does anyone know if there is a simple way to stop this contribution from adding the manufacturer name to the product URLs. Any guidance will be gratefully received. Cheers, Paul
  11. Cyburg

    [Contribution] oscThumb

    Hi, I know this particular issue with oscThumb is quite old, but just in case anyone else is having the same problem (as I did): Find the following code in "catalog/product_info.php" (the code you seek is an alteration made during the install of the Products Extra Images" contribution): document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="prettyPhoto[' . $product_info['products_name'] . ']" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], "", SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="prodimg" hspace="5" vspace="5" name="prodimg"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); and replace it with this: document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="prettyPhoto[' . $product_info['products_name'] . ']" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], "", SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class="prodimg" hspace="5" vspace="5" name="prodimg"', true) . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); You will notice that the only difference between the two lines of code is that I have added an extra parameter to the tep_image call in the replacement, which tells oscThumb to use the original thumbnail, rather than generating its own. Cheers, Paul
  12. Cyburg

    Who's Online Enhancement 1.4

    Hi Michael, I have my domain inserted into the line you pointed me towards in "admin/whos_online.php", but I am still seeing no markers on the map; I have also checked to ensure that my domain is entered correctly in the two defines at the top of "visitors_georss.php". Do you have any other ideas as to what might be preventing this from working correctly? Cheers, Paul
  13. Cyburg

    Who's Online Enhancement 1.4

    Hi Michael, I am gonna give this a go later tonight; thank you very much for your reply. I'll let ya know how I got on. Cheers, Paul
  14. Cyburg

    Who's Online Enhancement 1.4

    Hi all, I have just installed 3.5.5 but I see no customer markers on the Google map; has anyone else had a similar problem? Cheers, Paul
  15. Hi, Ok sorted...... .... if you are having the same problem that me and Scott both had, where you are returned to the login page even though you supply the correct user name and password, and you can see your successful logins being recorded in the "admin_lognum" field of the database table "admin", the following fix may work for you. Bear in mind that I am using "Multi admin with levels" not "Admin Access Level Accounts", although from what I can gather they are very similar; the reason I posted here is twofold, firstly, because the contributions are so similar, and also because "Multi admin with levels" has no support forum thread. Ok, the fix: I have had a close look at the install instructions for both contributions (maybe someone will point out that I haven't looked close enough), and neither of them appear to state that the following code needs to be removed, or commented out in "admin/includes/application_top.php": // redirect to login page if administrator is not yet logged in if (!tep_session_is_registered('admin')) { $redirect = false; $current_page = basename($PHP_SELF); if ($current_page != FILENAME_LOGIN) { if (!tep_session_is_registered('redirect_origin')) { tep_session_register('redirect_origin'); $redirect_origin = array('page' => $current_page, 'get' => $HTTP_GET_VARS); } $redirect = true; } if ($redirect == true) { tep_redirect(tep_href_link(FILENAME_LOGIN)); } unset($redirect); } The reason that I didn't see this pitfall yesterday when I installed "Multi admin with levels" must be because residual information left in my session from using the original oscommerce login method earlier in the day (i.e. $_SESSION['admin']), was allowing my login attempts to proceed through this code in "application_top.php"; once the session was gone, I was screwed!! If you too are unable to login after installing either "Admin Access Level Accounts" or "Multi admin with levels", then check your "admin/includes/application_top.php" file for the code above, and remove it. Cheers, Paul
×