Latest News: (loading..)

Unified

Members
  • Content count

    96
  • Joined

  • Last visited

1 Follower

About Unified

Profile Information

  • Real Name
    Jiten
  • Location
    London
  • Interests
    I'm a big footy fan... Nothin beats a Pint & a footy match with on a saturday and sunday afternoon!
  • Website
  1. Hi Alane, I have a "crappy" soultion for using both these contributions together. Assuming both contributions are installed correctly, only one file need changing: 1. OPEN catalog/product_thumb.php 2. FIND the following (around line 39): $tn_path = 'thumbnails/'; // The default is 'thumbnails/', should be chmod 777 3. REPLACE above code with the following: $tn_path = ''; // The default is 'thumbnails/', should be chmod 777 This corrects the image path, so they display correctly. REASON WHY SOLUTION CRAPPY: What this change means is that ALL your thumbnails are no longer stored "neatly" away in the catalog/images/thumbnails folder... ALL your thumbnails will now be located in catalog/images - though it is untidy, I'd rather have both contributions working together than not having one and tidy images folder! HTH, Unified
  2. Hi All, I used this contrib a few years ago now... and also assisted in trying to solve issues with it (albeit unsuccessfully), and am very glad to see that it is running very smoothly now. However, does it now support attributes? If not, is it something that others would want? I may try to get it to work (I tried in the past and failed - hopefully improved php/sql skills since then) but wouldn't mind pointers/advice. Thanks
  3. Hi Frank, I seem to have encountered the following error when using the Fastcheckout with the Ship in Cart contribution (the ship in cart contribution informs the customer of the likely shipping cost before checking out - very good for customers!): This only occurs IF: (1) I add products to the cart -> (2) then go to the checkout -> (3) enter details as new customer but do not create an account -> (4) when on your checkout_shipping.php page click either "back" or "shopping cart" to return to shopping_cart.php. (Please note that when on checkout_shipping.php, if I continue onto checkout_confirmation.php, everything is fine!) It is when I return to shopping_cart.php that I am now confronted with the Warning error. Having read numerous posts regarding this error, it seems that the country_id is not being assigned a number correctly when the "temporary" account is created UNLESS you move onto checkout_confirmation.php?! I have tried to look at all files concerned, but my level of php is not good enough to find and eliminate the error. Any ideas Frank, or others on how to elimenate this error from occuring? Thanks in advance!
  4. Hi Nana, First, many many thanks for this great contribution and all the support and development you have provided over the months! With respect to the catalog/account_password_new.php page, I completely understand your reason for, and the logic in having this page. Essentially, it provides a customer who inititally sets out to purchase without creating an account to have another opportunity to create an account. Psychologically, during the transaction, the only thing on a customers mind is the product. Many customers are deterred from completing transactions because of being weary about having to create an account and leaving their personal information for, what they deem, longer than necessary with an internet website. Once a transaction is complete, and they have seen how simple and smooth it was to go about their purchase, they may be more likely to consider the option of wanting to create the account! So good thinking on this page Nana! I have also modified the account_password_new.php page by: (1) Replacing the "Continue" button with a "Create Account" button; and (2)changing the "Back" button into a "Log off" button (I have actually called it "End Shopping" button) which essentially ends the session and prevents the loop occuring where a customer clicks on continue without entering a password and is instead presented with the same screen demanding a password. To do this, find the following code in catalog/account_password_new.php: <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> and REPLACE with: <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td><?php echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' . tep_image_button('button_end_shopping.gif', 'Click here to log off your shopping session without creating an account') . '</a>'; ?></td> <td align="right"><?php echo tep_image_submit('button_create_account.gif', 'Click here to create your account with your requested password'); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> Make sure you create the relevant new buttons (i.e. (1) button_end_shopping.gif and (2) button_create_account.gif) and place them in catalog/includes/languages/[your language]/images/buttons/ directory. Then open catalog/includes/languages/[your language]/create_account.php and find: define('ENTRY_CREATEACCOUNT', REPLACE the ENTIRE LINE to: define('ENTRY_CREATEACCOUNT', 'Before you leave, you can create an account with us by simply entering a password of your choice in the boxes below?<br><br>By creating an account you will be able to shop faster, stay up to date with your orders status, and keep track of any orders you may have previously made, and much more!<br><br>If you do not wish to create an account, simply click below on "End Shopping."'); You can really add whatever text you want, but I feel it is good to give the customer some blurb as to how to safely exit the store. Hope this helps!
  5. Dear All, I have found the solution using good old fashioned trial and error. Here is the solution: (1) Open catalog/includes/shipping_estimator.php. (2) Find the following code: if (CART_OT_SHOW == 'true'){ // bof damned we need the taxes if not logged in ... if (!tep_session_is_registered('customer_id')){ $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { $order->info['total']; } else { $order->info['total']+=$tax_val; } } } // eof damned we need the taxes if not logged in (seems like less code than in order class ???) (3) Replace above with: if (CART_OT_SHOW == 'true'){ // bof damned we need the taxes if not logged in ... if (!tep_session_is_registered('customer_id')){ $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } // $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { // $order->info['total']; // } else { $order->info['total']+=$tax_val; } } } else { $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; // $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; //} else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } $order->info['tax'] -= $tax_val; // $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { $order->info['total']; // } else { // $order->info['total']+=$tax_val; } } } // eof damned we need the taxes if not logged in (seems like less code than in order class ???) My apologies for wasting everyones time! Thanks.
  6. Hello All, I have installed the Ship in Cart v2.10 contribution (it is an amazing contribution) but am having problems with the way it calculates (1) the subtotal and (2) tax, when they are showing. Basically, the subtotal and tax are calculated correctly when a user is not logged in. However, once the user is loged in, the subtotal appears with the amount of the tax for the product being deducted from the VAT exclusive price of the product! i.e. Product price = ?10.00 (exclusive of VAT) and ?11.75 (inclusive of VAT). Subtotal = ?8.25 (exclusive of VAT) I think that I am close to figuring this out, but having spent almost 3 days of looking at the same piece of code, I am getting very sore eyes and making more mistakes than sorting the actual problem out! If someone could let me know what needs to be added or changed to the following piece of code from catalog/includes/modules/shipping_estimator.php, it would be much appreciated (I can post entire source code to file if that would help): if (CARTSHIP_SHOWOT == 'true'){ // BOF get taxes if not logged in if (!tep_session_is_registered('customer_id')){ $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { $products_tax = tep_get_tax_rate($products[$i]['tax_class_id'], $order->delivery['country_id'],$order->delivery['zone_id']); $products_tax_description = tep_get_tax_description($products[$i]['tax_class_id'], $order->delivery['country_id'], $order->delivery['zone_id']); if (DISPLAY_PRICE_WITH_TAX == 'true') { //Modified by Strider 42 to correct the tax calculation when a customer is not logged in // $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity']; $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity']; } else { $tax_val = (($products[$i]['final_price']*$products_tax)/100)*$products[$i]['quantity']; } // $order->info['tax'] += $tax_val; $order->info['tax_groups']["$products_tax_description"] += $tax_val; // Modified by Strider 42 to correct the order total figure when shop displays prices with tax if (DISPLAY_PRICE_WITH_TAX == 'true') { /* $order->info['total']; } else {*/ $order->info['total']+=$tax_val; } } } // EOF get taxes if not logged in (seems like less code than in order class) Anyone familiar with the above file/code will now that I have already slightly changed the code to show the subtotal/tax correctly when the user is NOT logged in (but it doesn't work when the user IS logged in!) I should add that the method by which I show both VAT exc/inc prices is by using the following pices of code: In catalog/includes/classes/currencies.php: function display_price($products_price, $products_tax, $quantity = 1) { return '<span class="VAT">(' . $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . VAT_TEXT . ')</span>'; } function display_price_exc($products_price, $products_tax, $quantity = 1) { return $this->format(tep_tax_exc($products_price, $products_tax) * $quantity); } In catalog/includes/functions/general.php I add tep_tax_exc: //// // Add inc. tax to a products price function tep_tax_exc($price, $tax) { global $currencies; return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) /* + tep_calculate_tax($price, $tax) */; } Then, where I require both/either Vat exc/inc prices to be shown I add either: (1) for VAT exc prices: $currencies->display_price_exc($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) (2) for VAT inc prices: $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) I cannot understand why this code would affect the subtotal/tax calculation only when a user is logged in in the Ship in Cart contribution? Apologies if I haven't been clear - let me know if further clarification is required, and thanks in advance for any help! Regards, Unified
  7. Sorry Guys for double post, but I sorted out my last issue of the stock not being updated when an attribute has been purchased. Again, I found the answer was in an earlier thread... In catalog/checkout_process.php: Move: $products_attributes = $order->products[$i]['attributes']; right beneath: if (STOCK_LIMITED == 'true') { Just for the information of others who may be having a similar problem, previously this piece of code: $products_attributes = $order->products[$i]['attributes']; was situated elsewhere in checkout_process.php. Simply move it as stated above and, hey presto, it works! Again credit for the above solution goes to ralphday - who posted it previously. Regards, Jiten
  8. Hi Ralphday, Thank you for all your advice. I can now add the stock quantity to the attribute, which is brilliant! However, the stock does not deduct everytime an item with that attribute is purchased. I did look at the previous posts on the register globals issue, but still cannot find a way around this. I'll keep trying and will let you know if I have any success! Again, thank you ralphday for all your hardwork and advice! All the best, Jiten
  9. Hello, I have just installed QTPro 31_1.1 onto a heavily modified site, after testing it on an unmodified version of OSC. But I have encountered 2 errors: 1. On the stock.php page in admin, I can only change the quantity for the product... the options to choose the quantity for a particular attribute does not appear at all, even though I have added attributes for that product! 2. On the Low stock report I am getting the following error: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select parent_id from categories where categories_id = [TEP STOP] I cannot figure out why, though I think the cause of these problems may be down to another contribution - the options type feature contribution. Any suggestions? Thanks guys, Jiten
  10. Thanks Justin for your prompt reply, and my apologies for being vague in my previous email regarding product attirbutes. That is exactly what I want... However, I appreciate what you mean by OSC not managing the inventory counts on attributes. I myself have only recently started to use attributes with the products I sell, and so I had overlooked the inventory counts issue (a major oversight on my part, which could result in serious errors with my stock take!) I think I am going to stick with option 1 for the time being, but I may try, if I get any free time, to have a go at hacking the core OSC code to record inventory counts by attribute (on a trial & error basis!) Thanks Justin for saving me a lot of trouble, and the great work you have done with the RMA system. Jiten (Unified)
  11. Hi Justin, Thanks for the great work, but I just have one question about the changes you have made: Is your version of the RMA system capable of dealing with product attributes? I am selling computer systems, and customers are able to change certain components in the system. The old version of RMA (which I tried to fix, unsuccessfully) did not recognise product attributes. I am assuming that you have not implemented product attributes yet, as I have looked at your RMA files and there does not seem to be any code for product attirbutes, nor are there any tables for attributes in the database. If you have any suggestion, or are likely to consider this (or not) for the future it would be much appreciated. Thanks for all your hardwork, and of others in this thread! Regards, Unified
  12. I think that you can define how the date is shown in: catalog/includes/languages/english.php Look for: define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() Try swapping %d and %B with each other... see if it works. Sorry I haven't tested so cannot be 100% sure if it will work. You may have to otherwise mess around with the database! Regards Jiten
  13. Hello, This can be done in the following way: tep_datetime_short is not defined... so instead we use tep_date_long! OPEN printorder.php and add the following line wherever you want the date to appear (make sure it is in a table though! ie within the <td> and </td> tages!): <?php echo '<b>' . TEXT_DATE_ORDER_CREATED . '</b> ' . tep_date_long($order->info['date_purchased']); ?> I added mine just below payment method so the code looks like this now: <tr> <td class="main"><?php echo '<b>' . ENTRY_PAYMENT_METHOD . '</b> ' . $order->info['payment_method']; ?></td> </tr> <tr> <td class="main"><?php echo '<b>' . TEXT_DATE_ORDER_CREATED . '</b> ' . tep_date_long($order->info['date_purchased']); ?></td> </tr> NEXT you need to define TEXT_DATE_ORDER_CREATED, so in catalog/includes/languages/english/printorder.php add: define('TEXT_DATE_ORDER_CREATED', 'Date Purchased:'); You can define it to say whatever! The date will be shown like this example: Friday, 09 November 2004 Let me know if it works! Regards Jiten
  14. Yes that is controlled as a product attribute. Use chandra's option type feature contribution as this will alllow you to have the standards drop down boxes, radio buttons, check boxes and even a text area (eg for the IMEI number). Hope that helps!
  15. Hello Greg Sorry been away a couple of days... but here's my returns_track.php: <?php /* $id author Puddled Internet - http://www.puddled.co.uk email support@puddled.co.uk osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); /* if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } */ if (!$HTTP_GET_VARS['action']){ $HTTP_GET_VARS['action'] = 'returns_track'; } if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { case 'returns_show': // first carry out a query on the database to see if there are any matching tickets $database_returns_query = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS . " where customers_id = '" . $customer_id . "' and rma_value = '" . $HTTP_POST_VARS['rma'] . "' or rma_value = '" . $HTTP_GET_VARS['rma'] . "'"); if (!tep_db_num_rows($database_returns_query)) { // tep_redirect(tep_href_link('returns_track.php?error=yes')); tep_redirect(tep_href_link('returns_track.php', '', 'SSL').'&error=yes'); } else { $returns_query = tep_db_fetch_array($database_returns_query); $returns_id = $returns_query['returns_id']; $returned_products_query = tep_db_query("SELECT * FROM " . TABLE_RETURNS_PRODUCTS_DATA . " op, " . TABLE_RETURNS . " o where o.returns_id = op.returns_id and op.returns_id = '" . $returns_id . "'"); $returned_products = tep_db_fetch_array($returned_products_query); require(DIR_WS_CLASSES . 'order.php'); $order = new order($returned_products['order_id']); } break; } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURN, '', 'NONSSL')); ?> <!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> <base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"> <?php // echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?> </td> </tr> </table></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="2"> <tr> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <? if ($HTTP_GET_VARS['action'] == 'returns_show') { include(DIR_WS_MODULES . 'returns_track.php'); // } ?> <?php // ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '20', '20'); ?><br</td> </tr> <?php //} ?> <table></td> <!-- end new insert here --//--> <? } else { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <? if (isset($error)=='yes') { $error_message = '<tr> <td colspan=3 class=main>The details you entered do not match any of our records, please try again, or contact us for further assistance</td> </tr> <tr>'; new infoBox(array(array('text' => $error_message))); // } echo '<br><BR>'; } $returns = tep_draw_form('rma_find', tep_href_link('returns_track.php', '', 'NONSSL'), 'get'); $returns .= tep_draw_hidden_field('action', 'returns_show'); $returns .= tep_hide_session_id(); $returns .= '<tr> <td colspan=3 class=main>Please enter the RMA number you recieved when you placed you item for return.</td> </tr> <tr> <td width=100& colspan=3 class=main> </td> </tr> <tr> <td width="25%" height="30" align="left" class="main">Your <b><i>RMA</i></b> Number</td> <td width="5%" height="30" align="center" class="main"> </td> <td width="75%" height="30" align="left" class="main"><font color=red><input type=text name="rma" value="" size=20></font></td> </tr> <tr> <td width=100& colspan=3 class=main> </td> </tr> <tr> <td width=100% colspan=3 align=right><input type=submit name="submit" value="Find Return ->"> </td> </tr> </form> '; new infoBox(array(array('text' => $returns))); ?> <!-- </table></td></tr>--> </table></td></tr> </table></td></tr> <? } ?> </td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> I hope that helps! Regards Jiten