Latest News: (loading..)

Peper

Members
  • Content count

    459
  • Joined

  • Last visited

1 Follower

About Peper

  • Birthday 11/28/1975

Profile Information

  • Real Name
    Pierre
  • Gender
    Male
  • Location
    South Africa
  • Website

Recent Profile Visitors

22,996 profile views
  1. Thanks Tsimi I have sorted this out with "" <?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], "");?>"/> <?php echo $percent_select; ?></td>
  2. It does not seem that classes/currencies is responsible for that , Any way to remove that thousands , entirely in specials?
  3. Hello Tsimi In admin/specials.php it shows the specials with a thousands separator So what happens is If you for example just enable the special it defaults to price = 1 I found that the thousands_point seems to be a problem ie, 1,243.56 So if you enter the special price as 1234.56 and then update its ok, but not with the , I tried changing below and finding a solution, pls help <td width="15%" class="dataTableContent" align="center"><input name="discount" style="border:1px solid #ccc;text-align:right" type="text" size="8" value="<?php echo number_format(tep_add_tax($specials['specials_new_products_price'], $tax_rate),intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], $currencies->currencies[DEFAULT_CURRENCY]["thousands_point"]);?>"/> <?php echo $percent_select; ?></td> <td width="8%" class="dataTableContent" align="center"><?php if($specials['specials_new_products_price']){echo number_format(-1*($specials['products_price'] - $specials['specials_new_products_price'])*100/$specials['products_price'], intval($currencies->currencies[DEFAULT_CURRENCY]["decimal_places"]), $currencies->currencies[DEFAULT_CURRENCY]["decimal_point"], $currencies->currencies[DEFAULT_CURRENCY]["thousands_point"]).'%';}else{ echo '---';} ?></td>
  4. Thanks for confirming I however tested on my localhost test server and is showing correct. Will need to compare diff The version I'm using is pre January 2017
  5. Hello, I seem to not find the expires_date for a coupon when customer enters it on checkout_confirmation.php page Customers can still use old expired codes. Any fix for this pls
  6. Login request timed out. Please try again.
  7. Hello Burt Yes, a new module would be great Ok, below is working, after many tries(will test many more times though) To make a module to do this, how? even where to start? <div id="headerShortcuts" class="col-sm-<?php echo $content_width; ?> text-right buttons hidden-xs"> <div class="btn-group"> <?php // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } if ($customer_group_id < '1'){ if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_LOGOFF, 'fa fa-sign-out', tep_href_link('logoff.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'fa fa-sign-in', tep_href_link(FILENAME_LOGIN, '', 'SSL')); if ($cart->count_contents() > 0) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')); } } if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'fa fa-user', tep_href_link('account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('contact_us.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_CREATE_ACCOUNT, 'fa fa-database', tep_href_link('create_account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('contact_us.php', '', 'SSL')); } } else{ if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_LOGOFF, 'fa fa-sign-out', tep_href_link('logoff.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'fa fa-sign-in', tep_href_link(FILENAME_LOGIN, '', 'SSL')); if ($cart->count_contents() > 0) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')); } } if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'fa fa-user', tep_href_link('account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('wholesale_contact.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_CREATE_ACCOUNT, 'fa fa-database', tep_href_link('create_account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('contact_us.php', '', 'SSL')); } } ?> </div> </div>
  8. Hello there I'm trying to do some statements for the includes/modules/header/templates/buttons.php I have the normal contact_us.php and then for wholesale customers(SPPC) i have wholesale_contact.php file So what i'm trying to do is if it is a normal retail customer or not logged in show contact_us.php wholesale customer show wholesale_contact.php page - ID > 0 So I assume adding to top of page in buttons.php: // BOF Separate Pricing per Customer if (isset($_SESSION['sppc_customer_group_id']) && $_SESSION['sppc_customer_group_id'] != '0') { $customer_group_id = $_SESSION['sppc_customer_group_id']; } else { $customer_group_id = '0'; } then if this then that but not getting it to work correctly: if ($customer_group_id !='0') { my buttons page is as follows: <div id="headerShortcuts" class="col-sm-<?php echo $content_width; ?> text-right buttons hidden-xs"> <div class="btn-group"> <?php if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_LOGOFF, 'fa fa-sign-out', tep_href_link('logoff.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_LOGIN, 'fa fa-sign-in', tep_href_link(FILENAME_LOGIN, '', 'SSL')); if ($cart->count_contents() > 0) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')); } } if ( tep_session_is_registered('customer_id') ) { echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'fa fa-shopping-cart', tep_href_link('shopping_cart.php')) . tep_draw_button(HEADER_TITLE_CHECKOUT, 'fa fa-credit-card', tep_href_link('checkout_shipping.php', '', 'SSL')) . tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'fa fa-user', tep_href_link('account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('contact_us.php', '', 'SSL')); } else { echo tep_draw_button(IMAGE_BUTTON_CREATE_ACCOUNT, 'fa fa-database', tep_href_link('create_account.php', '', 'SSL')) . tep_draw_button(IMAGE_BUTTON_CONTACT_US, 'fa fa-volume-control-phone', tep_href_link('contact_us.php', '', 'SSL')); } ?> </div> </div> Please show me how
  9. So far i came up with a short answer, but there is many functions required to make this properly works like proper tax value for shipping country. Also if an order is edited in admin then the discount class changes to ie ot_custom_2 or ot_custom_2 so on and makes it even more difficult If anyone wants to add/change below please help, file admin/packingslip.php This hopefully will save some admin time to manually punch in values into calculator and ending up making mistake. /// this part after $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id, payment_method, customers_id, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $customer_id = tep_db_fetch_array($orders_query); $orders=$customer_id['customers_id']; $customer_id = $orders; ?> /// this part ///// add next to page <?php function filter_text($text) { $filter_array = array(",","\r","\n","\t"); return str_replace($filter_array,"",$text); } // function for the filter // -------------------- QUERIES 1 ------------------------------------// //Orders_tax $orders_tax = tep_db_query("select value from orders_total where class = 'ot_tax' and orders_id = " . $oID); while($row_orders_tax = tep_db_fetch_array($orders_tax)) { // end // $Order_Tax = filter_text($row_orders_tax["value"]); } // -------------------- QUERIES 2 ------------------------------------// //Orders_subtotal $orders_subtotal = tep_db_query("select value from orders_total where class = 'ot_subtotal' and orders_id = " . $oID); while($row_orders_subtotal = tep_db_fetch_array($orders_subtotal)) { // end // $Order_Subtotal = filter_text($row_orders_subtotal["value"]); } // -------------------- QUERIES 3 ------------------------------------// //Orders_discount $orders_discount = tep_db_query("select value from orders_total where class = 'ot_discount' and orders_id = " . $oID); while($row_orders_discount = tep_db_fetch_array($orders_discount)) { // end // $Order_Discount = filter_text($row_orders_discount["value"]); } // -------------------- QUERIES 4 ------------------------------------// //Orders_insurance $orders_ot_insurance = tep_db_query("select value from orders_total where class = 'ot_insurance' and orders_id = " . $oID); while($row_orders_ot_insurance = tep_db_fetch_array($orders_ot_insurance)) { // end // $Order_insurance = filter_text($row_orders_ot_insurance["value"]); } /// Begin calculations /// If zero insurance - disable display of insurance value completely if ($Order_insurance !=="0.0000") { /// Amounts above 1 then calculate if (($Order_Discount < "1") || ($Order_Tax < "1")) { echo "Insurance Value: <b> " . round(($Order_Subtotal + $Order_Discount) * 1.14) . '</b>'; /// /// Amounts above 1 then calculate } elseif (($Order_Discount > "0.1") || ($Order_Tax > "0.1")) { echo "Insurance Value: <b> " . round($Order_Subtotal * 1.14) . '</b>'; /// Manual calculate then } else { echo "Calculated Insurance Value: <b> _________________ " . '</b>'; } // if ($Order_Tax < "1") { //echo "Insurance Value: <b>2 " . round($Order_Subtotal + $Order_Discount). '</b>'; // }else{ // echo "Insurance Value: <b>3 " . round(($Order_Subtotal + $Order_Discount) * 1.14) . '</b>'; // } // print '<br>1 Order Subtotal: ' . $Order_Subtotal; // print'<br>2 Order Discount: ' . $Order_Discount; // print '<br>3 Order Tax: ' . $Order_Tax; // print '<br>4 Order Insurance: ' . $Order_insurance; } ?>
  10. Please need help to figure out out following. In admin i print a packingslip.php and then all details is shown from total weight to everything that is needed to complete a waybill for couriers. The only thing missing is a simple calculation to show the actual value of the order for courier insurance purposes if customer selected the option. This means Subtotal - discount(discount coupon applied) * TAX As easy as that. No how to get simple function to calculate this?
  11. Thanks Burt :thumbsup:
  12. I'm bit baffled on the removal of html in admin/pdf_packingslip.php : Only the company name shows up as eg <b>My Company name</b> The tep_html_entity_decode is telling it to remove html but still I find <b> and </b> only on the customers company name Anyone knows where to remove the html? //Draw the invoice address text $pdf->SetFont(PDF_INV_CORE_FONT, 'B', 10); $pdf->SetTextColor($standard_color[0], $standard_color[1], $standard_color[2]); $pdf->Text(11, 65, tep_html_entity_decode(ENTRY_SOLD_TO)); $pdf->SetX(0); $pdf->SetY(70); $pdf->Cell(9); $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->customer['format_id'], $order->customer, '', '', "\n")), 0, 'L'); same with Ship to //Draw the invoice delivery address text $pdf->SetFont(PDF_INV_CORE_FONT, 'B', 10); $pdf->SetTextColor($standard_color[0], $standard_color[1], $standard_color[2]); $pdf->Text(120, 65, tep_html_entity_decode(ENTRY_SHIP_TO)); $pdf->SetX(0); $pdf->SetY(70); $pdf->Cell(118); $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->delivery['format_id'], $order->delivery, '', '', "\n")), 0, 'L');
  13. Hello Raiwa @@raiwa I noticed in admin if I copy and link a product to a new category and then afterwards delete the copied product in the new category the items SPPC pricing is also deleted(missing). Only the normal retail price remains on the original product Can this be confirmed or just me?
  14. Anyone knows why x-sell redirects to index page after Buy Now is clicked? Item does get added to cart though, no messagestack shown and goes to index page Double checked install instructions, using 2.3.4 edge Admin settings for Display Cart After Adding Product = false