Jump to content

Cyburg

Members
  • Content count

    68
  • Joined

  • Last visited

Everything posted by Cyburg

  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
  16. Hi, Does anyone have a solution to the problem that Scott (partsace) was having here: http://forums.oscommerce.com/index.php?sho...st&p=243950? I installed the contribution yesterday, and got it working great; then I come back into work this morning, and every login attempt I make just redirects me back to the login page; I too can see the number of logins for the account I am using being incremented in the database, the same as Scott could, so I know the login is being processed. Only thing that I can think of that might be affecting this, that may have changed since yesterday, is the fact that my original admin session (from prior to installing this contribution) will now be gone; is a missing oscid for the admin likely to be the problem here, or something else? Any comments will be gratefully received. Cheers, Paul
  17. nm, I have just installed this: http://addons.oscommerce.com/info/2037...... ....and it does what it says on the tin!!
  18. Hi all, I have this contribution installed and sort of working on RC2; I do have one small issue though, that I hope someone may be able to help with.... ...if I navigate to the admin section of our test site, the original osCommerce login page appears. If I login using the original osCommerce login page, only then am I taken to the new Admin Access Level Accounts login page. How can I stop the original login page from being used? Shouldn't the new login page be a replacement, rather than a supplement to the original login? Cheers, Paul
  19. Hi all, I have a problem I am struggling with here; hopefully someone will be able to help me out: If I have the ID of a particular shipping module (I think what I have is the ID), such as "customercollection_customercollection", how do I use that ID to obtain complete information about that particular shipping method with regard to a particular order? Cheers, Paul
  20. MY REPLY TO A PM ABOUT THIS TOPIC: Hi, I was working on a new payment module when I had that particular issue, I assume you are also making a custom payment module? When I wrote that particular payment module, I needed to update the record in the database for the order I was working with; I needed to add some data to the order whilst the payment module was being processed at checkout. My first attempts to do this failed because I had placed my code (the code to update the order in database) in the "before_process()" function of my payment module; I scratched my head for ages wondering why I couldn't obtain an order ID to work with. Then I realised that there isn't any order ID available in the "before_process()" function, because at that stage the order hasn't even been inserted into the database, and the order ID is only autogenerated by MySQL when the database insert for the order takes place. In my case the solution was simple, I just moved my custom code to the "after_process()" function in my payment module; at this stage of the process, the ID of the inserted order is available, you can access the value by using the global variable "$insert_id". Here is my "after_process()" function: function after_process() { global $insert_id; // set the order account status flag tep_db_query("update " . TABLE_ORDERS . " set order_on_account = 2 where orders_id = '" . (int)$insert_id . "'"); // set the order status flag tep_db_query("update " . TABLE_ORDERS . " set orders_status = " . MODULE_PAYMENT_PO_ORDER_STATUS_ID . ", last_modified = now() where orders_id = '" . (int)$insert_id . "'"); } Hopefully, you will be able to do your processing in the "after_process()" function of your new payment module; let me know how you get on. I will also post this message to the thread I originally started on this topic, in the hope that it might provide more complete information to anyone else facing the same issue. Cheers, Paul P.S. Apologies for not getting back to you much much sooner Mario; I am always extremely busy at work, and I rarely find time to visit the forum.
  21. Hi all, So this will hopefully be a really simple question to answer; I am trying to get the order id for the current order from within the code of a payment module that I am creating. Any help will be gratefully accepted. Cheers, Paul
  22. Cyburg

    CSS Menu

    SOLVED; expect to see my contribution released soon!!!! Cheers, Paul
  23. Cyburg

    CSS Menu

    Hi again, I have changed the two queries that appear at the top of the categories_css.php file to read as follows: $categories_subs_query = tep_db_query("select count(*) as count, c.parent_id from " . TABLE_CATEGORIES . " c where " . $categories_to_process . " GROUP BY c.parent_id"); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and " . $categories_to_process . " order by sort_order, cd.categories_name"); The variable $categories_to_process contains a string of SQL which limits the categories that are returned by the queries: $categories_to_process = "c.categories_id = '27' or c.categories_id = '87' or c.categories_id = '84'"; After making these changes, the structure of the menu that I get returned is as expected; all of the links in the menu work as expected, and if I choose to display products, the correct products are displayed within categories which contain them. Here's the odd thing: When I limit the categories that are returned in this way, all of the category names which fall below the top level of my category/subcategory hierarchy are being given the same display name. For example, in the image below, all of the second level categories have been given the name "Used Telegraph Poles" when in fact neither of these two product categories are called "Used Telegraph Poles"; however, as explained above, the links actually work as expected, taking you to the correct category listing page when clicked. Could anyone that knows this code well, please point me in the right direction to get the correct names assigned to the list items; I am modifying this contribution, in order to produce another contribution which will allow the admin to create multiple category infoboxes, which I will release to the community (the contribution will be compatible with the Infobox Admin contribution #1175). Cheers, Paul
  24. Cyburg

    CSS Menu

    Hi all, Hope someone can help me; if I wanted to restrict this contribution, so that the menu only displayed items from a single parent category, how would I do that? I have tried editing the second SQL statement in the categories_css.php file to limit the records that are returned to only a single parent category; however, when I view the page, I get the following error: "Warning: Invalid argument supplied for foreach() in /home/galaxi/public_html/cat_css_test.php on line 143" Cheers, Paul
  25. Hi, How can I help you Mario, give me a few more details about what you are trying to achieve and I will do the best I can for you. Cheers, Paul
×