Jump to content

darkside

Members
  • Content count

    54
  • Joined

  • Last visited

Everything posted by darkside

  1. The aim of running the shop is to make money, right? Is the work of picking, packing, labeling, posting really worth the money you make after PayPal charges, packing cost and postage? Hopefully! However, I am sure a few people don't know how much they are actually making per order, in terms of clear profit. In my day job, I work in operational Marketing, were I am responsible for the profitability and pricing for a range of products (about 4,000 lines!) for a large corporation. As such I am constantly monitoring products to manage the gross margin. I am tracking this for my business with an Excel sheet - one for product costings and pricing and one for my order day book. I input the total product cost and net payment price (net of any charges such as commision from PayPal) and calculate clear profit and gross margin (before operating costs). OK - so I don't generate enough orders to leave work but equally don't want to make a loss! My idea is to add financial reporting funtionality into my shop, so I can generate on-line reports showing my profitability right in the shop, identifying where the price needs to go up or the cost come down, where I have room to promote slow moving lines and how much cash/turnover I am doing. As I see it, the mod would be quite easy: Product - add in a field for product cost (in db, add product and modify product) Maybe a total cost line could be added - postage costs can either be built in to the product cost or deducted from the net price. Order - add in a field for net price (in db and order admin) Then 'all' that is left to do is drop in some reporting into the order summary line in the admin panel: Cash Margin = Net price - total cost GM (%) = (net price-total cost)/net price Once it gets sophisticated, formatting could be set (say, lines under 40% GM are red; lines under ?5 cash margin are red) to allow quick identifications of troublemakers and similar top limits (over 100% GM are green). These values may be tweakable from the admin panel. Soooo.... Anyone think it's a good idea? Anyone want to help? Timescales wise, I need to get Xmas over, have a good break and then get stuck in!
  2. darkside

    Financial reporting contribution

    I searched the contributions high and low but nothing jumped out at me as meeting my needs. Thanks for the link - I'll have a look at the functionality.
  3. darkside

    [contribution] Simple Template System (sts)

    Bingo! Just came back to post an quick fix and saw you have posted too, CK! I have the header tags contribution installed. I had to take out <?php // BOF: WebMakers.com Changed: Header Tag Controller v2.5.2 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } // EOF: WebMakers.com Changed: Header Tag Controller v2.5.2 ?> from the offending pages. Weirdly, that code is on other pages, that work fine. Oh well! It seems to be fixed - I am going to play more then make the move to the live site!
  4. darkside

    [contribution] Simple Template System (sts)

    OK- half way there but need a wee bit of help if at all possible! The development copy is on my backup server (php5), here: http://server.re-create-it.co.uk/dev/gravity-slaves/shop/ The STS skin is mostly there and it seems to match my site BUT a couple (only found two so far) of files just give a totally blank output, with the debug options not showing anything different... Product - nothing! Payment - I added this in the same way as I added another of my boxes - they all work but the payment one! Any idea what to look for when there is a totally blank screen?
  5. darkside

    fast easy checkout

    Wow! Brilliant contribution. I am still wading through the thread and tweaking my checkout process before I add the PWA section. I have a tweak and a question! Tweak: (Aplogies if this was already in the mod and I was being hasty/blind - but couldn't see it!) On my install, the 'progress bar' stil had four steps, and was jumping straight to step two. The link to step one was back to 'checkout_shipping.php' - or stage two again, since stage one has been done away with now. To make the progress bar to match the new process, I changed the toolbar. Find the toolbar code and over-write the following: In 'checkout_shipping.php': <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="33%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td> <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="33%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> In 'checkout_confirmation.php', replace the progress bar with: <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> and in 'checkout_success.php': <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="33%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="33%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="33%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td> <td align="center" width="33%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="33%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> Finally, I modified my include/languages/english.php file to give 3 simple steps: // checkout procedure text define('CHECKOUT_BAR_DELIVERY', 'Delivery'); define('CHECKOUT_BAR_PAYMENT', '1/ Delivery and Payment'); define('CHECKOUT_BAR_CONFIRMATION', '2/ Confirmation'); define('CHECKOUT_BAR_FINISHED', '3/ Finished!'); Don't forget to backup, folks! ;) Question: Can I show the order total as a line before shipping, just to remind the customer what they have in their basket? Here would be an ideal time to also remind them about any free shipping options you have (Spend another 'x' and get free shipping type promt/help notice!). I know the order total won't roll up until they choose the shipping option - but most people can do the sum and like to track what they are spending... Maybe? Hope that helps and TIA!
  6. Woohooo! Think I am done! First found this contrib as a fresh install, which worried me as I have products, customers and orders all stored. The SQL file had me going and I was ready to pick through it line by line - but a quick read of this thread and I am up and running with full UK formatting and all orignial data in tact! Looks great - thanks for all the coding, tutorials and help here! My turn to give a little (well, I did say little!) back! Yup - it can and is easy - when you know what you are looking for. I did it with a table edit from phpMyAdmin - hope you have access to this. Choose 'shop_database' -> 'address_format' -> Browse Edit the relevant field (#2 for me, as I had already applied the country fix above so UK address used Field #2) Input the below string against 'address_format' in the table: $firstname $lastname$cr$streets$cr$city, $state$cr$postcode$cr$country Note : You can add spaces and commas at will. The '$cr' gives your required line return in the formatting. Job's a good 'un! ;)
  7. I have searched high and low with no luck - but am sure this must have been asked/done before! I currently have two 'delivery' options available - table rate and pick up. Since the 'pick up' cost is zero, it gets selected all the time as the best way to ship. However, the majority of people will want delivery. I'd like to save these guys the click (and possible order/billing error). What I would like to do is prevent the 'pick up' being counted in the best way calculation - or ensure that table rate is selected by default. Any clues?!
  8. darkside

    Change default shiping module selection

    Well, by commenting out the following /*if no shipping method has been selected, automatically select the cheapest method. // if the modules status was changed when none were available, to save on implementing // a javascript force-selection method, also automatically select the cheapest shipping // method if more than one module is now enabled if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest(); */ nothing is selected and the user cannot proceed until a shipping option is chosen. Just need to add the pop-up or a visual warning that no shipping method has been chosen - and job's a good 'un. Still be nice to pre-select the most common postage option, rather than the cheapest so if anyone has any ideas, would be good to hear!
  9. Here is a screen grab from my Checkout Shipping page. There seems to be some spurious output below the methods of shipping. This output is there no matter which method is selected. It only disappears when no shipping method is selected at all! I am using a standard script with no mods other than my template. This is running on another store I have deployed in the usual manner! Any clues?
  10. darkside

    Strange table display in shipping modules

    Thanks for trying to help... The script doing the actual work (the shipping module) is not modified. I have simply 'wrapped' my template round the shop by editting the includes/top.php and includes/bottom.php but this does not impact on any of the functionality within the site. I have replaced the files with direct copies from my other working install (live store that I did for another client) and cannot seem to get this to work either on my local server or my host... :blink:
  11. darkside

    Strange table display in shipping modules

    With what? As stated, I am running the standard script, with no mods. I have already tried replacing the file with the original (same!) file but no joy. The self-same file that shows errors on my site works OK on another site, hosted on the same server. Turning all shipping modules off does fix it, but any one or more cause this output. I was wondering if this could be down to something in the shipping module config - but can't seem to find anything to turn off or over-ride under Modules -> Shipping.
  12. darkside

    HSBC secure-epayment module

    I think it was a dead heat :blink: Certainlly know how Neo felt in the Matrix - I can look at pages of code and exploded session arrays and understand them implicitly now!
  13. darkside

    HSBC secure-epayment module

    UPDATE! I have finally got orders appearing in the admin panel of the site!!! Wooohooo!! B) It's been a while and I have had to battle with server moves, file installation and undocumented problems along the way in order to get everything working! Thanks to everyone who helped. Even though your help may not have been the directly attributable to my exact problem, the overall troubleshooting, questioning and suuport has got me there in the end - as well as raising my coding ability and e-commerce understanding several notches!!! So, to sum up, things are looking good and I hope this is now running smoothly. Does anyone fancy helping in the compilation of a FAQ for this module? I have not found any detailled low-level documentation and feel something along these lines would be invaluable. If this sounds like a good idea, PM me and I'll start the structure - if only to 'give a bit back' to the forum!
  14. darkside

    HSBC secure-epayment module

    Cheers! By plural of files, I presume you mean store and admin? Store: define('HTTP_SERVER', 'http://www.fivefortykitesports.co.uk'); // eg, http://localhost define('HTTPS_SERVER', 'https://www.fivefortykitesports.co.uk'); // eg, https://localhost define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.fivefortykitesports.co.uk'); define('HTTPS_COOKIE_DOMAIN', 'www.fivefortykitesports.co.uk'); define('HTTP_COOKIE_PATH', '/shop/'); define('HTTPS_COOKIE_PATH', '/shop/'); define('DIR_WS_HTTP_CATALOG', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/home/fivefort/shop/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '****'); define('DB_SERVER_PASSWORD', '****'); define('DB_DATABASE', '****); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' And the admin one for good measure define('HTTP_SERVER', 'http://www.fivefortykitesports.co.uk'); // eg, http://localhost define('HTTP_CATALOG_SERVER', 'http://www.fivefortykitesports.co.uk'); define('HTTPS_CATALOG_SERVER', 'https://www.fivefortykitesports.co.uk'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/home/fivefort/public_html/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/shop/admin/'); // absolute path required define('DIR_FS_ADMIN', '/home/fivefort/public_html/shop/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/shop/'); // absolute path required define('DIR_FS_CATALOG', '/home/fivefort/public_html/shop/'); // absolute path required define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost define('DB_SERVER_USERNAME', '****'); define('DB_SERVER_PASSWORD', '****'); define('DB_DATABASE', '****'); define('USE_PCONNECT', 'false'); // use persisstent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' I think I found one error and am now getting returned to the store with the message The transaction was rejected by FraudShield At least I am logged in and that part seems to be working now!!!
  15. darkside

    HSBC secure-epayment module

    Turning force cookies on causes a 'red' error line to be shown and a cookie is set on the local machine, so those settings seem to be working.... define('HTTP_SERVER', 'http://www.fivefortykitesports.co.uk'); // eg, http://localhost define('HTTPS_SERVER', 'https://www.fivefortykitesports.co.uk'); // eg, https://localhost define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.fivefortykitesports.co.uk'); define('HTTPS_COOKIE_DOMAIN', 'www.fivefortykitesports.co.uk'); define('HTTP_COOKIE_PATH', '/shop/'); define('HTTPS_COOKIE_PATH', '/shop/');
  16. darkside

    HSBC secure-epayment module

    Cheers - 'Force Cookie Use' is set to false in the sessions pane on the admin site. Will check the config files - any clues? I guess the cookie domain is the one to be looking for?
  17. darkside

    HSBC secure-epayment module

    Hey gcluk, Just to let you know that I feel your pain and am suffering similar problems - except that my user is being logged out. I added the code echo "Sessions: <pre>"; print_r($_SESSION); echo "</pre>"; to the footer of my site (fivefortykitesports.co.uk) so that I could see what variables are passed and what are returned to the site. From what I can see, before I send the orrder off, the following appear ? ?[customer_id] => 4 ? ?[customer_default_address_id] => 4 ? ?[customer_first_name] => Phil ? ?[customer_country_id] => 222 ? ?[customer_zone_id] => 0 ? ?[sendto] => 4 ? ?[cartID] => and when the user is returned to the site after making payment, all the order info is in the session (order hash, payment, etc) but no user info. This seems to be where the user is getting logged out and it all goes pear shaped. With no user to recognise, the line // if the customer is not logged on, redirect them to the login page ?if (!tep_session_is_registered('customer_id')) { ? ?$navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); ? ?tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); ?} in checkout_process.php seems to kick the user in to log on. As the user is not logged on, the site can't add the goods and place the order with the merchant. Questions (easy one first then the kicker!) - does my understanding sound right? :blush: - any clues as to why the session does not appear to contain the user data? :huh: - (for the grand prize) Anyone know how I can fix this?! :thumbsup: Luckily my hair is too short to tear or else I would be losing it too! :blink:
  18. darkside

    HSBC secure-epayment module

    Hi Andy, Thanks very much for the help - I wish I could say I was cooking now but unfortunately it still does not work! In the troubleshooting quest, I have added echo $osCsid; to the header of my site template so I can see that the session is generated and passed back and forth OK. With the new code in, the session displayed on return is the same as the one displayed before the link to HSBC so at least I know that this is working. Navigating away from the store and then returning (without closing the browser) returns the same session ID so this is being stored and maintained. However, for some reason the shop does not seem to be recognising the session on return from the HSBC site and the customer is always returned as a guest. If it helps, the development site is in action at www.fivefortykitesports.co.uk, with the payment module in test mode.
  19. darkside

    HSBC secure-epayment module

    After re-reading the forum again and again I have narrowed the problem down to the line in hsbc_return.php that redirects the user to the correct page. As it stands at the moment, I have: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL', false).'?osCsid='.$GLOBALS["MerchantData"]); I still get the problem of being logged out on return to the store. It would seem that the store is losing the session information and therefore not processing the order. I have tried all the suggested variants of the above line but cannot get it to work. Any clues or trouble shooting tips greatly appreciated!
  20. darkside

    HSBC secure-epayment module

    OK - it's late and I am sure I am missing something but I have been all through the forum and can't get any success! What I *can* do is get to the HSBC page and all the details of the order are there! What I *can't* do is return from the page and have the order processed. All that happens is that I return to the site as a guest. As soon as I log back in, the goods are still in my basket. I suspect that this is the order ID change discusssed earlier but I followed it to the letter and still get the problems! Any clues? I am tempted to go back to a clean install and start again -can anyone summarise the changes needed above and beyond the installation changes to get an order to process? Cheers!
  21. darkside

    HSBC secure-epayment module

    It's OK - I was being a goon and have figured out the path now! Bed time... :blink:
  22. darkside

    HSBC secure-epayment module

    My contribution has the line putenv("LD_LIBRARY_PATH=$path"); where I use $path so I can test on both a local and live server without making any changes. Is this the same line (putenv instead of $ export) in a later version of the contribution? TIA
  23. darkside

    HSBC secure-epayment module

    Cheers! That's perfect... My host let's me create folders alongside /public_html/ and safe mode is off. I think everything is now working - just waiting for the SSL to go live and fingers crossed, the testing can begin!
  24. darkside

    HSBC secure-epayment module

    I may be being a bit slow here... ...but if my server says 'safe_mode off' does this mean that I can upload libCcCpiTools.so into a folder under public_html on my webserver, without access to /usr/lib? If so, that would save a lot of hassle asking my webhost to upload this file to /usr/lib for me!
  25. darkside

    HSBC secure-epayment module

    Well Hi! I have been plugging away, digesting this thread and poring over the documentation to get this module working. I have some input as well as some questions! Call me stupid but I didn't realise at first that the files on the HSBC CD had to be placed on my server. After reading the thread, I worked out the placements and paths, but here's what I had to figure out... Tip - read your server logs! I know it's basic, but I was stumped by my server not finding TestHash.e for ages. This leads me on to my second tip... Tip - *nix servers are case sensitive! I spent ages playing with the path to TestHash.e in the code, only to realise I was calling TestHash.e and the file in my web root was called testhash.e. Doh! Question : I am running my module on a development box at the moment, running Red Hat 9. After trying to make a card payment, I am either returned to the store with the ocs message "The transaction failed because of invalid input data." or dumped back to the login page. Would this be due to the lack of SSL? If so, can I test the install by installing OpenSSL and self-signing a certificate? I figure that if I do this, I will have all the tools I need to get it working prior to going live. Since I would only require OpenSSL for a local test of this install, is there an easier option to proceed or is SSL connection a requisite of HSBC even at the test stage? TIA!
×