Jump to content

ecartz

♥Ambassador
  • Content count

    3,316
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by ecartz

  1. This is what the zones module does. Hth, Matt
  2. ecartz

    Options as Images for MS2 By Mark Stephens

    At a guess, you are closing the switch statement early with Mark's changes. When integrating with the Option Type Feature, you need to be careful to keep all the changes in a single case. Any new { need to be matched with a } and vice versa. Hth, Matt
  3. There is a max file size setting for PHP. The actual name is posted earlier in this thread. Hth, Matt
  4. Karsten, Try INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( 'Product option type Select', 'PRODUCTS_OPTIONS_TYPE_SELECT', '0', 'The number representing the Select type of product option.', 0, NULL , now( ) , now( ) , NULL , NULL ) instead. also remove 'configuration_id' and the associated number in VALUES for the other lines as well. Hth, Matt
  5. ecartz

    Master Products - MS2

    Mike, around lines 20-4 of includes/modules/new_products.php, try changing if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } to if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and p.products_master_status = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_master_status = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } this should make only non-master products display IIRC. Hth, Matt
  6. Following my instructions apparently... $products_name .= '<br>' . tep_image(DIR_WS_UPLOADS . $products[$i][$option]['products_options_values_name'], $products[$i][$option]['products_options_values_name'], 5, 5) . '<br>'; I remember thinking that it would need DIR_WS_UPLOADS there, but apparently I forgot to actually write it that way. Sorry, Matt
  7. Try $products_name .= '<br>' . tep_image($products[$i][$option]['products_options_values_name'], $products[$i][$option]['products_options_values_name'], 5, 5) . '<br>'; Hth, Matt
  8. I prefer the built in directory protection of the web server. With Apache, you do this with htpasswd files. There is a discussion of the mechanics in the Tips & Tricks forum. I have also used the Admin Access w/ Levels contribution in cases where directory protection was too simplistic. Hth, Matt
  9. I would try changing $products_options_file->set_filename("$insert_id" . $products_options_file->filename); to $products_options_file->set_filename("$insert_id" . '. ' . $products_options_file->filename); If that doesn't work, try changing both $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[UPLOAD_PREFIX . $i]] = $insert_id . ". " . $products_options_file->filename; $products_options_file->set_filename("$insert_id" . $products_options_file->filename); to $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[UPLOAD_PREFIX . $i]] = "$insert_id" . '.' . $products_options_file->filename; $products_options_file->set_filename("$insert_id" . '.' . $products_options_file->filename); Hth, Matt
  10. 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
  11. 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
  12. 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
  13. ecartz

    easy populate parse problem..

    'v_froogle_currency' => $iii++, )); should be 'v_froogle_currency' => $iii++ )); Hth, Matt
  14. 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
  15. 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
  16. The Options as Images contribution offers multiple pictures with radio buttons. Also, you can look at this thread. Hth, Matt
  17. 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
  18. 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
  19. Does http://forums.oscommerce.com/index.php?showtopic=72159 help? Matt
  20. 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
  21. Both. You encrypt on the server and decrypt on your local machine. I don't know the answers to your other questions. Hth, Matt
  22. 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
  23. 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
  24. 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
  25. ecartz

    List of "Must-Have" Modules?

    You may also want to look at this thread (official) or this one. Cheers, Matt
×