Latest News: (loading..)

Peper

Members
  • Content count

    454
  • Joined

  • Last visited

1 Follower

About Peper

  • Birthday 11/28/1975

Profile Information

  • Real Name
    Pierre
  • Gender
    Male
  • Location
    South Africa
  • Website
  1. Login request timed out. Please try again.
  2. 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>
  3. 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
  4. 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; } ?>
  5. 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?
  6. Thanks Burt :thumbsup:
  7. 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');
  8. 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?
  9. I'm trying to display the currency box only for customers who is logged in and from another country only So I came up with this part but not entirely even close Box not to display if user is not logged in and then also not to show up if country ID is 183, default currency is ZAR Please show me how to <?php if($check_country['entry_country_id'] == 183) { $currency = 'ZAR'; } else { ?> <div class="panel panel-default"> <div class="panel-heading"><?php echo MODULE_BOXES_CURRENCIES_BOX_TITLE; ?></div> <div class="panel-body"><?php echo $form_output; ?></div> </div> <?php } ?>
  10. 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
  11. So small glitch that customers are neglecting. I have Shipping insurance installed but for customers that are collecting in store or want to use own courier collection are not disabling shipping insurance option and then they checkout and pay for insurance. On my previous store I had following similar code and worked well to remove insurance for this options in these cases. So for similar action I'm trying to tell checkout_payment.php that if store collections (spu) or flat rate (flat) but is not working I was trying few other methods but like below shipping insurance is always 0 even when required. Anyone that can give some help on this please? <?php if ($_SESSION['shipping']['id'] == 'spu_spu' || $_SESSION['shipping']['id'] == 'flat_flat') { ?> <input type="checkbox" name="choose_insurance" value="0" checked> <?php } $_SESSION['choose_insurance'] = $_POST[choose_insurance]; // END Shipping Insurance 3.0 with customer choice ?> original old store code for checkout_payment.php page: <?php if ($_SESSION['shipping']['id'] == 'spu_spu' || $_SESSION['shipping']['id'] == 'flat_flat') { }else{ // BEGIN Shipping Insurance 2.0 with customer choice if (($order->info['total'] >= MODULE_ORDER_TOTAL_INSURANCE_OVER) && (MODULE_ORDER_TOTAL_INSURANCE_STATUS == 'true') && (MODULE_ORDER_TOTAL_INSURANCE_USE == 'true')) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo TEXT_SHIPPING_INSURANCE_TITLE; ?> </b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td class="main" width="100%" align="left"><input type="checkbox" name="choose_insurance" value="1" checked> <?php echo TEXT_SHIPPING_INSURANCE_CHOICE; ?> <span class="smallText"><?php echo TEXT_SHIPPING_INSURANCE_DISCLAIMER; ?></span></td> </tr> </table></td> </tr><tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } } // END Shipping Insurance 2.0 with customer choice ?>
  12. Tag inspector giving error correct tag and remove , for thousands seperator // echo 'ecomm_totalvalue: \'' . $this->page_totalvalue . '\'' . "\n"; // default // Fix echo 'ecomm_totalvalue: ' . '0' . '' . "\n"; // No use including the variable if it's empty (null) } else { echo 'ecomm_totalvalue: \'' . str_replace(",","",$this->page_totalvalue) . '\'' . "\n"; } // end fix
  13. Bump on this. I still only have a small hiccup when updating an order When you add comments for a customer and you enter for a space between lines then getting error: Multiple or malformed newlines found in additional_header in admin/includes/classes/email.php on line 522 the line 522 - return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers)); Just one single comment order update is fine So now checked and changed to return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers)); works, however the comments line breaks is removed to give one line of comments Anyone knows a solution?
  14. @@John W Ok, think I've got it now John Many thanks with a bump in right direction With your $customer_id = 501; the customer ID is needed so then when I do below it works like a charm. Now pdf and so also to sort out $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id, customers_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $customer_id = tep_db_fetch_array($orders_query); $orders=$customer_id['customers_id']; $customer_id = $orders; $tax_id_query = tep_db_query("select entry_company_tax_id from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $company_tax_id=tep_db_fetch_array($tax_id_query); $tax_id=$company_tax_id['entry_company_tax_id']; and then echo part <strong><?php echo ENTRY_COMPANY_TAX_ID; ?></strong><?php echo $tax_id; ?>