Jump to content
Latest News: (loading..)

Howmessages

Members
  • Content count

    16
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Michael

Recent Profile Visitors

1,985 profile views
  1. Shipping Bug - customers can get free shipping

    It is the other way around. Like this: Item cost = 16,00 Shipping fee = 5,00 Free shipping > 20,00 -> Put item in basket. Temporary Total = 16,00 -> On checkout_shipping.php is the Temporary Total > 20,00 = NO | Shipping fee is charged -> On checkout_payment.php the new Temporary Total is recalculated ( Item cost + Shipping fee) = 21,00. -> Go to anywhere else on the shop like home or basket. Temporary Total is still 21,00. -> Go to checkout_shipping.php again. Is the Temporary Total now > 20,00 = YES | Shipping fee is not calculated -> On checkout_payment.php the new Temporary Total is recalculated (Item cost + Free shipping) = 16,00. By then, if the customer does not leave the order proces, it will be able to pay the total amount of 16,00 and receive free shipping. But if the customer goes back to the shop and has to go trough the order process, it will recalculate the shipping fee based on the Temporary Total at that moment, which is 16,00 again, and will be charged a shipping fee again, thus there is a loop of charging a shipping fee and retract the shipping free everytime the customer goes through the order process. Without the fix, it is never ending. Hopefully this made some things clear.
  2. Shipping Bug - customers can get free shipping

    I've tried it in my live shop but in my case, it doesn't seem that ['subtotal'] is excluded from the 21% tax (Netherlands) and thus, it will base the shipping fee only on the price of the items including their tax fee. A product priced 21,00 ( 17,36 + 3,64 tax) will still get free shipping. I also received an e-mail that Demitry had replied to this post, but can't seem to find it. Do want to reply on it, though. My first thought was to look for the bug in /catalog/includes/modules/order_total/ot_shipping.php but changing either of the ['total'] tot ['subtotal'] didn't had any effect. Therefore tried to find the bug somewhere else and finding it in checkout_shipping.php. My thought is that with the first try on checkout_shipping.php, the amount has not yet met the required amount for free shipping and charges the shipping fee. After clicking next when it goes to checkout_payment.php the order amount with shipping fee is stored as ['total']. If that total (in my example product 16,00 + shipping fee 5,00 = total 21,00) is over the required amount for shipping fee, the next time you enter checkout_shipping.php, it will look for line 94 and see that the ['total'] is over the amount for free shipping and not include a shipping fee anymore. But after clicking next when it goes to checkout_payment.php again, it will retract the shipping fee stored before from the ['total']. In this case it will retract the shipping fee from the 21,00 making the ['total'] 16,00 but with free shipping. It will only initiate the else statement on line 99 in checkout_shipping.php if there is no free shipping. It will never be initiated with the above explained when the ['total'] (including the shipping fee) is above the required amount for free shipping. But I now noticed a string of code in /catalog/includes/modules/order_total/ot_shipping.php that can also be used in checkout_shipping.php. This is what I have done: Original line 94: if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $free_shipping = true; Changed line 94: if ( ($pass == true) && (($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $free_shipping = true; It seems to work in my case and I would think that if there would be any tax problems with using ['subtotal'], there won't be any with this fix since it is using the ['total'] again. This feels like a nice fix for this bug. But more testing is needed.
  3. I think I've found a bug in the in checkout_shipping.php that will allow customers to get free shipping, even when they haven't met the required amount. I saw it happen more frequently in my shop where people get free shipping for no reason and think I have found the bug. When it happens: If you have set up your store to charge, for instant, 5,00 for shipping but give free shipping from a certain amount, lets say 20,00, and the customer places a order of 16,00. Then the customer goes to the order process, it will be charged a 5,00 shipping fee on the checkout_shipping.php page and clicks next. But if the customer will go back to change something after clicking next on checkout_shipping.php, the next time the customer gets tot the checkout_shipping page, the shop will no longer charge a shipping fee but gives free shipping, even though the order total is just 16,00 and does not met the 20,00 minimum. If you repeat the process by clicking next, after that go back to the shop and go trough the checkout process again, it will undo the free shipping.But redoing it again, will give you free shipping again. It is endless. What I have found, is that after clicking next on the checkout_shipping.php, it will store the order total at that moment. In this case product (16,00) + shipping (5,00) = order total (21,00). If you go back at the store tot change something and go back to the checkout process, it remembers the order total from before, which is 21,00 in this case, and thus the shop decides to not charge a shipping fee since the amount is more than 20,00. But at checkout_confirmation.php, it recalculates the order total without the shipping fee stored before. Thus the total is back to 16,00 again, but without the shipping fee checkout_shipping.php is responsible for. It does not work if the product cost and shipping fee does not meet the minimum amount for free shipping. Product cost of 14,00 and shipping fee of 5,00 with a minimum of 20,-- for free shipping never gives the faulty order total. The solution I have found is to change a small line of code in checkout_shipping.php. Original at line 94 if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $free_shipping = true; Changed line if ( ($pass == true) && ($order->info['subtotal'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) { $free_shipping = true; This way it will always look at the order subtotal that never has the shipping fee included instead of the total. For as far as I was able to test this, it worked every time.
  4. Thank you for your response. The link was very helpfull. I've written a review on your site to see the differences in the sites and thus was able to fix the problem. Since I use SSL, all the content needs to be linked in https. The link/next button to place the written review wasn't and looped back to te same page. Chaning it, solved the problem. Help is not needed anymore.
  5. For some reason it is not possible to write reviews to my site in the latest version of the Bootstrap community version. The code is not changed yet after clicking the next button, the page just reloads but with the ?action=process&products_id=number Maybe this is something that does not work correctly on this version, or maybe it is just me. I can't seem to find the problem though.
  6. With the latest version of the versions of Gburtons Bootstrap osCommerce, the order pages of the admin side has these tabs for customers, products and status. This is a nice way to get things organized without having a full page of information. Now I like to do something similar on the product page that costumers can see. Tabs underneath the product info that costumers can click to reveal the specifications, reviews, status and/or maybe something else. A screenshot of my idea how it should look: Imgur: fIImN33.png This wil keep the page clean, especially for the mobiel view. Best would be to make this a module that's easy to install and uninstall. Maybe some others are willing to try and code this with me.
  7. Navbar Shipping Module for Bootstrap This Add-On adds a link to the shipping page in the Navbar. Easy installation without file modification. Just copy files and install or uninstall via the Admin section. Download: http://addons.oscommerce.com/info/9527
  8. Store Search Bar (BS)

    I'm glad to have helped.
  9. Store Search Bar (BS)

    This is where the define('MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_SHIPPING', 'Verzending'); in the language folder comes to use. Anyone can translate it to the languages used.
  10. Store Search Bar (BS)

    Thanks again for replying. I wasn't able to get your code to work, but find another way that did the job. $example = array('shipping.php', 'conditions.php', 'advanced_search.php'); $example2 = array(MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_SHIPPING, MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_CONDITIONS, MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_SEARCH, ); $newfile = str_replace($example, $example2, $file_name); define('MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_SHIPPING', 'Verzending'); define('MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE_CONDITIONS', 'Algemene Voorwaarden'); Now when searching for "verzending", the search bar nicely shows "Verzending" instead of "shipping.php". I'm pretty proud of myself, since I'm not really a PHP coder and still learning. Maybe this is something to code in the new version of the Add On, since I'm probably not the only one to want to change the names. This way, anyone is free to fill in their own page names.
  11. Store Search Bar (BS)

    Thank you for your response. This does change the result name, but it gives every page the same name. So changing it to $newfile = 'verzending'; means that it will name every page "verzending". instead of the dutch name for that page. I tried changing it so it will take the name of the HEADING_TITLE for that particular page, like this: include(DIR_WS_LANGUAGES . $language . '/' . $file_name); $newfile = HEADING_TITLE; Unfortunately, this will take the HEADING_TITLE of only one page, in my case for conditions.php, and not the HEADING_TITLE of the page it is referring to. Maybe you know how to code it, so it will take the HEADING_TITLE. If that is not possible, maybe there is a way to code it so instead of $newfile = 'whatever you want...'; for every page, I can put something there for the pages each.
  12. Store Search Bar (BS)

    In the admin -> modules -> content there is no option to rename the pages, only to select which pages to take in the search. The site is fully Dutch and the English language is deleted via the Admin as well as the language maps via FTP. The filenames are the standard ones, which are renamed in the URL with the SEO Friendly Urls PRO Edition to dutch names. These Dutch names should also be shown when searching for these pages like shipping -> verzending. Thanks
  13. Store Search Bar (BS)

    I've installed the latest version of the Add-On but can't seem to figure out how the change the names of the pages like shipping and condition. It takes the name of the file without the .php at the end, resulting in English names for a Dutch webshop. It's this piece of code: 'title' => sprintf( MODULE_CONTENT_HEADER_STORE_SEARCH_PAGE, substr(basename($file), 0, -4)), Tried to use a str_replace, but could't do it without breaking the whole code.. Someone who knows how to do this?
  14. To print invoices and packing slips, I use the module Batch Printing without Frames or PDF v2.3.1. Now i've changed the layout of the invoice to my taste but i like to add a customer ID to the invoice but I can't get it to work. I've tried different ways but all seem to leave the customer ID blanc. The code: <?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_BATCHPRINT_NOPDF); $currencies = new currencies(); $oID = tep_db_prepare_input($oID); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $order = new order($oID); $orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added"); $date = date('M d, Y'); ?> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" style="padding: 40px;"> <tr> <td width="33%" align="left"><span class="pageHeadingSM"><FONT FACE="arial" SIZE="2" COLOR="#000000"><strong><?php echo nl2br(STORE_NAME_ADDRESS); ?></strong></font></span></td> <td width="40%" align="left"><span class="pageHeadingSM"><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo HEADING_REGISTAR ?></font></span></td> <TD width="27%" ALIGN="right" VALIGN="top"><FONT FACE="arial" SIZE="2"><span class="style2">Factuurnummer: </span></font><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo $oID; ?><BR> Factuurdatum:<br /><?php echo tep_date_long($order->info['date_purchased']); ?><br> </tr> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <TD><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="10%"><hr size="2"></td> <td align="center" class="pageHeading"><b>Factuur</b</td> <td width="100%"><hr size="2"></td> </tr> </table></td> </tr> <tr> <td colspan="4"><?php echo tep_draw_separator('pixel_trans.gif', '100', '5'); ?></td> </tr> <tr> <td width="48%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="#F2F2F2"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main"> <tr> <td align="left" valign="top"><b><?php echo ENTRY_SOLD_TO; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td><br /><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><?php echo $order->customer['telephone']; ?></td> </tr> <tr> <td><?php echo $order->customer['email_address']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '7'); ?></td> </tr> </table></td> </tr> </table></td> <td width="4%"></td> <td width="48%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="main"> <tr> <td align="left" valign="top"><b><?php echo ENTRY_SHIP_TO; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> </tr> <tr> <td><br /><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td></td> </tr> <tr> <td></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '7'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></TD> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td> </tr> <br /> <br /> <tr> <TD COLSPAN="2"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" cellpadding="0" cellspacing="15"> <tr> <td align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main"> <tr> <td width="40%"> <b>Bestelnummer: </b> <?php echo tep_db_input($oID); ?></td> <td align="right"> <b><?php echo ENTRY_PAYMENT_METHOD; ?></b> <?php echo $order->info['payment_method']; ?></td> </tr> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td> </tr> <tr> <TD COLSPAN="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '25'); ?></td> </tr> <tr> <TD COLSPAN="2"><table border="0" width="100%" cellspacing="5" cellpadding="5"> <tr> <td style="font-weight: bold;"><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo TABLE_HEADING_QUANTITY; ?></FONT></td> <td style="font-weight: bold;"><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo TABLE_HEADING_PRODUCTS; ?></FONT></td> <td style="font-weight: bold;"><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></FONT></td> <td style="font-weight: bold;" align="right"><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></FONT></td> </tr> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { echo ' <tr>' . "\n" . ' <td class="dataTableContent" valign="top"><b>' . $order->products[$i]['qty'] . '</b> stuks</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>'; } } echo ' </td>' . "\n" . ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; echo ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" ; echo ' </tr>' . "\n"; } ?> <tr> <td align="right" colspan="5"><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> </table></td> </tr> </table> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%" colspan="3"><table class="main" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><div align="center"><?php echo TABLE_HEADING_FOOTER; ?></div></td> </tr> </td> </tr> </table> </table> </td> </tr> </table> </td> </tr> </table> I would like to put it in this line of code before the first TD: <TD width="27%" ALIGN="right" VALIGN="top"><FONT FACE="arial" SIZE="2"><span class="style2">Factuurnummer: </span></font><FONT FACE="arial" SIZE="2" COLOR="#000000"><?php echo $oID; ?><BR> Factuurdatum:<br /><?php echo tep_date_long($order->info['date_purchased']); ?><br> To me it does not seem to be something really difficult but whatever I try, it simply does not work. Things like $cID and importing it from the database. Is there someone who can help me?
×