Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

lushlongboards

Archived
  • Posts

    43
  • Joined

  • Last visited

Everything posted by lushlongboards

  1. hey safoo - I'm thinking of installing this (and modding it!) for the Lush Longboards and Session1 stores but I'm wary of it after reading your warnings. Are there any similar, better contributions you have used? As you say, there is very little on this one in terms of support. I can write my own, but would rather not spend hours at it! chris
  2. First up - awesome contribution and great instructions! It worked perfectly first time on my regular store (www.session1.com) . I also have a second store with a copy of the php running on a different server (www.lushatb.com) but using the same mySQL database. I get this error/warning on the second store ... is it something to do with the server being different? "Warning: gzinflate: buffer error in /includes/classes/cache.class.php on line 152" thanks! chris
  3. thanks safoo! It seems my code is quite buggy for regular OSC stores ...
  4. thanks for that ... I'd missed them :) lobotomia - I have not had that problem before ... can anybody else help with this? chris
  5. don't create a new category - you can hide them (I haven't tried, but everything is possible!) but everyone uses such different menus... I have just set all my special products to inactive since they don't show up in my shop. If your "inactive" or "out of stock" products still show in your shop then you might have to work out the category thing. Yes, this is the same as I use in my shop, but I also have the bundled products module installed. (it makes no difference to the gift mod though really). all it means is that when someone buys the gift the stock level of the original product is updated.
  6. let's call this the official thread. for discounted products, you need to copy the original product and change the price. Also change the name to say "Towel worth ?10 for just ?2" or similar. It's a bit crude, but it works. Currencies - perhaps someone can help out with this one? I haven't figured out the discounted category yet - this mod works on "copied" products rather than modifying product properties (which would ultimately be more powerful). Maybe someday, but don't hold your breath ... chris
  7. when you update a bundle, the script should delete all entries from the bundles table that relate to that bundle, before writing the new contents of the javascript drop down system. what browser are you using? maybe it's a javascript thing? ... c
  8. without having access to an osC with a preview step, I would say that it was def. to do it with the extra page that gets pulled up (the preview page). I reckon if you don't need preview then skip it!
  9. rpain - here is one solution. The script looks at the product model on the invoice and pulls up the current bundle contents from the products database (which is the limitation since this is not necessarily the same as the bundle contents at time of order) add $bundleContents = ''; $bundle_query = tep_db_query("SELECT pb.subproduct_id, pb.subproduct_qty, p.products_id, pd.products_name, pd.language_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN products_bundles pb ON (pb.bundle_id=p.products_id) LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id=pb.subproduct_id) WHERE p.products_model = '" . $order->products[$i]['model'] . "' AND pd.language_id = '1'"); while ($bundle = tep_db_fetch_array($bundle_query)) { echo "<br> <i>" . $bundle['subproduct_qty'] . " x " . $bundle['products_name'] . "</i>"; } into invoice.php just before the closing echo ' </td>' . "\n" . after the products_name is written to the user. Here's my invoice.php that you can drop into your cart to see what it looks like. <?php /* $Id: invoice.php,v 1.6 2003/06/20 00:37:30 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="10"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><b> Ship to:</b></td> </tr> <tr> <td class="smallText"> <?php echo "[" . $oID . "] " . tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?> </td> </tr> <tr> <td class="smallText"> <?php echo $order->customer['telephone']; ?> </td> </tr> <tr> <td class="smallText"> <font color="#666666"><b><font color="#000066">From:</font> <br> Lush, Unit 30, 62 Hoyland Rd, Sheffield, S3 8AB </b></font></td> </tr> </table> </td> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><b> Billing Address:</b></td> </tr> <tr> <td class="smallText"> <?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td class="pageHeading"> <p> </p> <p> </p> <p><?php echo 'Order ref ' . $oID . ' , Time: ' . $order->info['date_purchased']; ?></p> </td> </tr> <tr> <td> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b> <?php echo ENTRY_PAYMENT_METHOD; ?> </b></td> <td class="main"> <?php if ($order->info['payment_method']) { echo $order->info['payment_method']; } else { echo 'Manual or phone sale'; } ?> </td> </tr> </table> </td> </tr> <tr> <td class="main"> <?php $comments_query = tep_db_query("SELECT comments, date_added FROM " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oID . "'"); while ($comments = tep_db_fetch_array($comments_query)) { if ($comments['comments']) { echo '<br><b>Order comments:</b><br>' . $comments['date_added'] . ' : <font color="red">' . $comments['comments'] . "</font>"; } } ?> </td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2"> <?php echo TABLE_HEADING_PRODUCTS; ?> </td> <td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_PRODUCTS_MODEL; ?> </td> <td class="dataTableHeadingContent" align="right"> </td> <td class="dataTableHeadingContent" align="right"> </td> <td class="dataTableHeadingContent" align="right"> <?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?> </td> <td class="dataTableHeadingContent" align="right"> </td> <td class="dataTableHeadingContent" align="right"> <?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?> </td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr class="dataTableRow">' . "\n" . ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { for ($j = 0; $j < $k; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; echo '</i></small></nobr>'; } } $bundleContents = ''; $bundle_query = tep_db_query("SELECT pb.subproduct_id, pb.subproduct_qty, p.products_id, pd.products_name, pd.language_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN products_bundles pb ON (pb.bundle_id=p.products_id) LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id=pb.subproduct_id) WHERE p.products_model = '" . $order->products[$i]['model'] . "' AND pd.language_id = '1'"); while ($bundle = tep_db_fetch_array($bundle_query)) { echo "<br> <i>" . $bundle['subproduct_qty'] . " x " . $bundle['products_name'] . "</i>"; } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="dataTableContent" align="right" valign="top"></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"></td>' . "\n" . ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n"; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="8"> <table border="0" cellspacing="0" cellpadding="2"> <?php for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table> </td> </tr> <tr> <td class="smallText" colspan="8"> <p>Thanks for your order! Don't forget you can view the status of any of your past orders online.</p> <p> </p> </td> </tr> <tr> <td class="smallText" colspan="8"> <p> <?php echo nl2br(STORE_NAME_ADDRESS); ?> </p> </td> </tr> </table> </td> </tr> </table> <!-- body_text_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> The other solution I see is adding another table to the database to hold bundle contents at order stage. The order process as it is at the moment creates so much data per order that I'd be hesitant to create more ... :) chris
  10. rpain - I think it might be because I have removed the "preview" step in my admin system. I had completely forgotten that the original osC had the preview step! There's a mod somewhere that I used, and I guess that step forgets the bundle data somehow. as for more than 6 subproducts: in categories.php, find function fillCodes() { for (var n=0;n<6;n++) { and change the "6". then find all occurences of for ($i=0, $n=6; $i<$n; $i++) { and change the "6".... there are two places, one where the input fields are written to html and one where the database is written on an "update". updating stock when you delete an order? I've not worked on it yet... Chris
  11. cdamianou - it looks like you have not added the extra field (products_bundle) into your products_description table. You need to do this via a database admin page. fzx5co - what version of osC are you running? safoo/aism - what's the collaborative filtering mod you're talking about? chris
  12. Andreas - can you post your categories.php after you have modified it and I'll see if I can spot anything. chris
  13. this looks like it could be something missed out while you are editing categories.php ... I don't have a server where I can test this mod against a clean copy of OSC, but it looks like CC has got it working fine with the instructions I wrote. chris
  14. cool :) I'd be interested to see some other sites that use this mod when you have it running ... chris
  15. hi costas - what part of the install is troubling you? You need to edit your version of the files given in the instructions then upload them to your server. No extra files are needed. You also need to alter your database using an admin tool that should be provided by your server, such as myPhpAdmin. chris
  16. here's the mod: http://www.oscommerce.com/community/contributions,2015 please post queries in this thread only! chris
  17. doing my best ... I could put a hacked undocumented version up now but I'd rather get it properly ready first ... I've not even read the tips on submitting contributions yet...
  18. I noticed that when creating a customer, it sets the default_address_book_id to "1" in table customers. this makes it impossible to edit and possibly delete the customer by the normal methods. to fix: in catalog/admin/create_account_process.php, on the line below tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . tep_db_input($customer_id) . "', '0', now())"); (in mine it's line 401) add the following code: $address_book_query = tep_db_query("SELECT address_book_id FROM address_book WHERE customers_id = '" . $customer_id . "'"); while ($address_book = tep_db_fetch_array($address_book_query)) { $real_id = $address_book['address_book_id']; $sql_data_array_address_id['customers_default_address_id'] = $address_book['address_book_id']; tep_db_perform(TABLE_CUSTOMERS, $sql_data_array_address_id, 'update', "customers_id = '" . $customer_id . "'"); } and you're all sorted for future customers. for current customers, create a file "catalog/admin/account_clean.php" with the following in it, then run it by typing the url in. This will correct all the wrong entries. <?php require('includes/application_top.php'); $customer_query = tep_db_query("SELECT customers_id, customers_firstname, customers_lastname, customers_default_address_id from customers"); while ($customer = tep_db_fetch_array($customer_query)) { $address_book_query = tep_db_query("SELECT address_book_id FROM address_book WHERE customers_id = '" . $customer['customers_id'] . "'"); while ($address_book = tep_db_fetch_array($address_book_query)) { if ($customer['customers_default_address_id'] == 1) { $real_id = $address_book['address_book_id']; $sql_data_array_address_id['customers_default_address_id'] = $address_book['address_book_id']; tep_db_perform(TABLE_CUSTOMERS, $sql_data_array_address_id, 'update', "customers_id = '" . $customer['customers_id'] . "'"); $string .= '<br>updated entry for user ' . $customer['customers_firstname'] . ' ' .$customer['customers_lastname'] . ' to ' . $real_id; } } } echo $string; chris
  19. that is correct. You add the bundle master (the bundle) as you would a normal product, then select it's contents on the admin page. the stock level of the bundle master is irrelevant and is never checked or updated, only the contents matter. This naturally makes it quite a complicated mod, and while it works well on my heavily hacked site, it will take some time to neaten up for an osC mod. I'll do it as soon as I can. chris
  20. yes, that is generated by OSC - it looks at the contents of the bundle, displays it to the user and calculates a saving over the cost of parts separately. chris
  21. OK, bundles are now live on www.lushlongboards.com take a look at product http://www.lushlongboards.com/shop/product...&products_id=40 too see the user's view. bundles are created in admin section, and are all valid stock items which may be visible or not visible to the customer (using active/inactive as comes with OSC) stock of bundled items is checked before checkout ... ie the bundle is opened before stock check. likewise, after sale, stock of individual items is updated. 1 level of nesting is allowed, ie a bundle may contain another bundle, but not another bundle within that. would anyone like a contrib?
  22. I'm not sure I was very clear ... I need to create a manual order that will run through the regular card checkout process and most importantly update stock as it does so, ie use the regular checkout_process.php if possible. It would be good if it updated the "bestsellers" table, as it appears that this mod does not.
  23. I'm trying to get this mod working with SECPAY, to process phone orders by credit card ... I don't have SSL on my site so can't get it to show credit card details, I'd like it to run to the SECpay secure page with all the order details. Is this easy? chris
  24. OK, the mod is done, I'll post it up once it's been running clean for a week or so after site launch (which is in 2 weeks) so give it 3 weeks or so. chris
  25. I tried master products contribution but it's not what I want and it looks like quite a few others have similar issues. The idea is to update the stock of a number of sub-products in a bundle when a single item is purchased. The cost of the single item does not need to be related to the total cost of the items in the bundle, so deals can be applied. All products in the bundle are normal, only the main product needs an extra field. Sub-products in a bundle may be used in any number of master products (eg bearings on a skateboard) I'm working on the following concept; my PHP and knowledge of OSC is still young so it will take a few weeks.... A) are there any other contribs that will do this? B) Shall I try and make it into a contribution module? Add a field into the products information (eg "bundle_contents") Insert into this field a string containing the codes/SKUs for the subproducts (eg "23&45&65&111"). I'm not sure what delimiter would be best at this point. When the product is displayed, PHP checks to see if the product has data in this field. If data exists, it prints a simple list of bundle contents in the product info part. This list may be extended to include a "saving" figure if I can get it to calculate the total cost of the contents and compare with the product price. No other changes are made until "callback" after order (I have not found this file yet). This file will check each product for bundle_contents before updating stock. If bundle_contents contains bundle data (product contains others) then it will expand and update the stock of each subproduct. If anybody sees any flaws or suggestions please submit here, or email me. If I can get it to work it may be worth a new contribution as it is a different approach to "Master Product" chris
×
×
  • Create New...