Jump to content

AlexandrZuyev

Members
  • Content count

    24
  • Joined

  • Last visited

  1. I made a small addon to the checkout_process.php so when I get an email from my store I see order info + Customer's IP and Geo Country. Maybe it could be usefull for someone else... MYSQL: ALTER TABLE orders ADD customers_ip varchar(25) NOT NULL; Edit file checkout_process.php find line 92 $payment_modules->before_process(); Add after: // Get and set customer's Geo and IP into order's email function ip_visitor_country() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; $country = "Unknown"; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.geoplugin.net/json.gp?ip=".$ip); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $ip_data_in = curl_exec($ch); // string curl_close($ch); $ip_data = json_decode($ip_data_in,true); $ip_data = str_replace('"', '"', $ip_data); // for PHP 5.2 see stackoverflow.com/questions/3110487/ if($ip_data && $ip_data['geoplugin_countryName'] != null) { $country = $ip_data['geoplugin_countryName']; } return $ip.', '.$country; } $customers_ip = ip_visitor_country(); // output Coutry name ----- Find $sql_data_array = array('customers_id' => $customer_id, add after 'customers_ip' => $customers_ip, ----- Find // lets start with the email confirmation $email_order = STORE_NAME . "\n" . Add after: IP . ' ' . $customers_ip . "\n" . ----- //END
  2. AlexandrZuyev

    Bootstrap Modal Cart with Upsell Product

    Thanks a lot - working nicely! ps I made a small addon: it checks customer's IP+Country (curl_setopt($ch, CURLOPT_URL, "http://www.geoplugin.net/json.gp?ip=".$ip) ;)at checkout_process.php and send data with the order to Admin's email. Maybe someone will like also to use it. Where can I post the code?
  3. AlexandrZuyev

    Bootstrap Modal Cart with Upsell Product

    The module is installed but no pop-up working. BS 2.3.4 EDGE Thanks www.germida.com
  4. AlexandrZuyev

    [Addon] Modular Navigation Bar (Bootstrap)

    @@Denzel many millions thanks for Categories Module for modular Navbar from 2.3.4 BS-EDGE-Version It is so great there are ppl like you :) Please anytime you are in Russia or Belarus -- give me a note! I'll invite you to spend a couple of weeks here at my horse ranch.
  5. Can I use PayPal express for OsC BS without upgrading my PayPal account to a business one? Thanks!
  6. Installed Version: osCommerce Online Merchant v2.3.4 Bootstrap Problem: cannot set my PayPay e-mail for accepting PP payments (express and standard) without upgrading existed PP to a Business one. I don't want my PP account to be upgraded to business. May I ask for a step-by-step manual please to stay at private acc? Thanks!
  7. AlexandrZuyev

    NEW! Complete Order Editing Tool!

    sorry, solved
  8. AlexandrZuyev

    CONTRIBUTION Product Tabs

    Is it possible to set "Reviews" under a instead of Shipping or Features? For ex integrate with Reviews on Product Info Page
  9. Dear all. Kindly give me a hint if it is possible... DB: oscommerce Table: countries There are countries_name - in russian & countries_iso_code_2 - codes in lat. What to so: let in the catalogue/ (create_account.php, address_book_process.php etc) be lat names (taken from countries_iso_code_2) if a customer uses English language in the shop. For the rest it will be Russian as is. Will appreciate all your possible help in coding. Thank you! Hope english-speaking customers will be able to choose their country at last.
  10. AlexandrZuyev

    [Addon} Modular Front Page

    Jim, at first I'd like to say many thanx for the module. I have upgraded it a little bit and now it works fine for me. Is there a possibility to make a new_products.php work like a slide-show (caorusel)? I've tried to replace your tables with div's but have lack ao knowledge. I tried to make it like Product Cycle Slideshow Box for 2.3.1 but failed. Maybe your next ver could be slide-showable please? ))
  11. AlexandrZuyev

    [contribution] Total B2B

    Done! The code is simple: $customer_discount = tep_get_discount_b2b($prid); if (($customer_discount >= 0) && (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true')) {
  12. AlexandrZuyev

    [contribution] Total B2B

    Hallo. Is there a possibility to use a Discount Code 2.6 for osCommerce Online Merchant v2.3.1 together with B2B? I mean there is a code in checkout_payment.php <?php // Discount Code 3.1.1 - start if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') { ?> <h2><?php echo TEXT_DISCOUNT_CODE; ?></h2> <div class="contentText"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="middle" height="25"><?php echo tep_draw_input_field('discount_code', $sess_discount_code, 'id="discount_code" size="10"'); ?></td> <td width="5"></td> <td valign="middle"><div id="discount_code_status"></div></td> </tr> </table> </div> <?php } // Discount Code 3.1.1 - end ?> How can I set to show this code only for those customers who do not belong to any discount group? For ex.: if ((customers_discount !='true') && (customers_groups_id !='true') && (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true')) {
  13. As well one mistake in cartDelete: function() cartDelete: function() { if (confirm('<?php echo CONFIRM_DELETE ;?>')) { var row = $(this).parent(); $.ajax( { data: 'action=cartDelete&pID=' + $(this).attr('data-pID'), success: function(data) { if (data.products == 0) {window.location = '<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL');?>';return false;} else { row.remove(); checkout.headerShortcutsRefresh(); checkout.colsRefresh(); checkout.totalsRefresh(); checkout.RowsRefresh('payment'); if (data.shipping == 'false') $('#shipping').hide(); else {$('#shipping').show(); checkout.RowsRefresh('shipping');checkout.AddressRefresh('shipping');} } } }); } }, But it perrfectly works when there is only one item in the cart. But if there are two ore more different products then I got a mistake An item that is precced "delete" is deleted but the java-script mistake still exists.
  14. Anytime I press "CHECKOUT" got the mistake. Maybe you have got the sollution about it? Thank you!
  15. Hallo. Is there a contrib like that: -at admin module during adding an item make a check-box "THE BEST" and such an item will be marked with <b> or CSS <div> image .best { color: #0000ff; background-image: url('images/best_bgr.gif'); background-repeat: no-repeat; background-position: right; } Thank you!
×