Jump to content

ecartz

♥Ambassador
  • Content count

    3,187
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by ecartz

  1. ecartz

    NEW PAYPAL

    It looks to me like changing the process_button function in includes/modules/payment/paypal.php to look like the following would work: function process_button() { global $order, $currencies, $currency, $customer_id, $billto; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } $billing_info_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, co.countries_iso_code_2, z.zone_code, c.customers_email, c.customers_telephone from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_COUNTRIES . " co, " . TABLE_ZONES . " z, " . TABLE_CUSTOMERS . " c where ab.address_book_id = '" . (int)$billto . "' and ab.customers_id = '" . (int)$customer_id . "' and ab.entry_country_id = co.countries_id and ab.entry_zone_id = z.zones_id and c.customers_id = '" . (int)$customer_id . "'"); $billing_info = tep_db_fetch_array($billing_info_query); $telephone = preg_replace('/\D/', '', $billing_info['customers_telephone']); $process_button_string = tep_draw_hidden_field('cmd', '_ext-enter') . tep_draw_hidden_field('redirect_cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('currency_code', $my_currency) . tep_draw_hidden_field('first_name', $billing_info['entry_firstname']) . tep_draw_hidden_field('last_name', $billing_info['entry_lastname']) . tep_draw_hidden_field('address1', $billing_info['entry_street_address']) . tep_draw_hidden_field('address2', $billing_info['entry_suburb']) . tep_draw_hidden_field('city', $billing_info['entry_city']) . tep_draw_hidden_field('state', $billing_info['zone_code']) . tep_draw_hidden_field('zip', $billing_info['entry_postcode']) . tep_draw_hidden_field('lc', $billing_info['countries_iso_code_2']) . tep_draw_hidden_field('email', $billing_info['customers_email_address']) . tep_draw_hidden_field('night_phone_a', substr($telephone, 0, 3)); tep_draw_hidden_field('night_phone_b', substr($telephone, 3, 3)); tep_draw_hidden_field('night_phone_c', substr($telephone, 6, 4)); tep_draw_hidden_field('day_phone_a', substr($telephone, 0, 3)); tep_draw_hidden_field('day_phone_b', substr($telephone, 3, 3)); tep_draw_hidden_field('day_phone_c', substr($telephone, 6, 4)); tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); return $process_button_string; } I haven't tested it though. Use at your own risk. You may want to leave off the telephone lines, as osCommerce doesn't have an exact equivalent to the PayPal choices. Hth, Matt
  2. What do the changes in includes/application_top.php look like in your store? You basically need to change the filename to match the attribute value (it is actually looking for "12. image.ext" rather than the original image.ext name). You should be able to set them to match in includes/application_top.php. The only thing that might concern me is the space between 12. and image.ext. Some filesystems can be goofy about spaces. Hth, Matt
  3. You would make the changes in the .htaccess file in images/upload (to allow images to be viewed), the shopping_cart.php file (to display the image), and possibly includes/application_top.php (you need to save the extension so the browser knows how to display the image). Make sure that you have the includes/classes/upload.php file set to restrict uploads to image extensions as well. Wouldn't want someone to access a PHP file that they uploaded. Hth, Matt
  4. ecartz

    easy populate parse problem..

    'v_froogle_currency' => $iii++, )); should be 'v_froogle_currency' => $iii++ )); Hth, Matt
  5. ecartz

    Easy Populate Question

    No, you can't. Easy Populate uses the products_model to determine which product you are currently uploading. Duplicate products_model values will cause the later products to overwrite the earlier ones. You may want to look into adding a meaningless string to all your part numbers, i.e. something like -0 for unique products, -1 for the second occurrence, etc. Another alternative would be to rewrite EasyPopulate, but you will probably find it easier to add the string unless you are relatively proficient with PHP/MySQL (or hire someone who is). If you do decide to modify EP, I would suggest adding more category fields (to add the second category path) rather than trying to make the products_model field non-unique. Hth, Matt
  6. This is usually a sign that the mail server isn't configured to send email from your store, just to your email address. Adding one of the following commands to the top of includes/classes/email.php may help: ini_set('sendmail_from', STORE_OWNER_EMAIL_ADDRESS); ini_set('sendmail_path', '/usr/bin/sendmail -t -i -f ' . STORE_OWNER_EMAIL_ADDRESS); Otherwise, check with your host to see if they can find a way to do this. Hth, Matt
  7. The Options as Images contribution offers multiple pictures with radio buttons. Also, you can look at this thread. Hth, Matt
  8. ecartz

    NEW PAYPAL

    I think that the IPN module would be better suited to the current needs of people like wizardsandwars (who uses PayPal with other payment methods) if it was purely a drop in. To make it like this on the catalog side, one would simply not change checkout_process at all and change includes/modules/payment/paypal.php (around lines 132-4) from function after_process() { return false; } to function after_process() { global $insert_id, $order; tep_db_query("update " . TABLE_ORDERS . " set paypal_ipn_id = '" . (int)$order->paypal_ipn_id . "' where orders_id = '" . (int)$insert_id . "'"); return false; } Ideally (IMO), one would get rid of even that much and just use the traditional osCommerce tables to store the PayPal info. More consistent interface that way. Also would simplify the admin part of the contribution. You could then have a separate contribution which would do the post shipping checkout details on the PayPal side (or possibly even including shipping--difficult to operate complex shipping methods that way though). This would be for use of shops that only use the PayPal. It seems to me that the current IPN contribution sort of straddles the two alternatives: too much to just be a drop in; not enough to be a replacement solution. YMMV. My $.02, Matt
  9. If you read the STS thread in this forum, you will find that it is currently incompatible with MS1 (which does not have includes/filenames.php). Hth, Matt
  10. Does http://forums.oscommerce.com/index.php?showtopic=72159 help? Matt
  11. ecartz

    How to remove a module?

    Oh, you can't remove contributions. You can only mark them out of date. Note: someone else might still be able to use the methods in your contribution to implement a contribution for something else. Hth, Matt
  12. Both. You encrypt on the server and decrypt on your local machine. I don't know the answers to your other questions. Hth, Matt
  13. ecartz

    Easy Populate Problem

    We are still waiting for you to post lines 654-664 of easypopulate.php as John requested. There isn't much that we will be able to do without this. Cheers, Matt
  14. There are instructions for that somewhere (maybe in the HTML file that comes with the distribution? I remember writing them...). Basically, you change the code in includes/application_top.php to save the file as something like 1-imagename.ext rather than 1 (where 1 is the files_uploaded_id). You want to leave the files_uploaded_id so that you don't get conflicts between different images that happen to have the same name (the original version of the contribution overwrote the images in that case). Hth, Matt
  15. You would have to make two modifications to the code: 1. You would need to retain the extension info, so the browser would know what image it is. 2. You would need to change the shopping cart and/or product info pages to display the image. Hth, Matt
  16. ecartz

    List of "Must-Have" Modules?

    You may also want to look at this thread (official) or this one. Cheers, Matt
  17. Lay away (at least what I know as lay away) is where the customer does not have enough money to buy the item, so they pay a down payment to reserve it and make payments over time. When the complete price has been collected, the item is shipped. Hth, Matt
  18. No, the BTS does not let you edit display graphically at this time. If that is what you would like to do, you should use the STS (Simple Template System) instead. Hth, Matt
  19. ecartz

    Master Products - MS2

    Setting admin > Configuration > My Store > Display Product Counts to false would have the same effect and is more efficient (product counts are hard on the database in larger stores). Hth, Matt
  20. ecartz

    Master Products - MS2

    Yes, each duplicate product will have its own stock level (even though they may represent the same product). Linked products share stock levels but won't work for this, as they would also share masters. Matti already suggested that this might change in the future (i.e. that he might make a version that allowed a slave to actually have two or more masters; this would require another database table). In the meantime, the duplicate method will work (albeit clunkily). Hth, Matt
  21. ecartz

    How to remove a module?

    admin > Modules > Whichever > Whichever; click Remove. Replace the first Whichever with Payment, Shipping, or Order Total. Replace the second with the name of the module. Hth, Matt
  22. Hello, You can't use PHP in the STS template file; it doesn't get read that way. If you want to do something like that, you would be better off with the BTS or just editing the files without a template system. In this case though, I don't think that you need to put the code there. Just make a new box that holds the link that you want and put the code in the box. I suspect that you can find an example of this in the main STS support thread. Hth, Matt
  23. ecartz

    receiving email with osC

    Even if you want to implement it yourself (for example, if you are maintaining your own server or you are a host), I would use squirrelmail or something like that (there might be a PHP equivalent) to do the webmail. Then if you wanted to make the glue into a contribution, that would be cool. The new login/session classes might be useful here, so you might want to build it off an MS3 snapshot. Hth, Matt
  24. In the most current version, I would try changing (around line 50 of includes/modules/payment/ccavenue.php): $Amount = $order->info['total']; to $Amount = $currencies->format($order->info['total'], true, 'RUP'); Note: you may have to replace 'RUP' with the appropriate three letter code for Indian Rupees. I am not familiar with that currency, so I am not sure of the code. You also might have to add logic to strip out the currency symbol from this. If that doesn't work for you, you could try looking at the currencies class directly and figuring the value using a variant of the code there. Hth, Matt
  25. ecartz

    Master Products - MS2

    The next version is supposed to support attributes IIRC (read through this thread and the Announcements thread to see what I saw). In the meantime, if you are only selling downloadable CDs (i.e. all your products are Master CDs and Slave tracks), then you could fudge the code to treat all the products as downloadable. Hth, Matt
×