Latest News: (loading..)

raiwa

Community Sponsor
  • Content count

    1,842
  • Joined

  • Last visited

  • Days Won

    49

raiwa last won the day on May 28

raiwa had the most liked content!

About raiwa

Profile Information

  • Real Name
    Rainer Schmied
  • Gender
    Male
  • Location
    Sant Iscle de Vallalta, Barcelona, Spain
  • Website

Recent Profile Visitors

33,096 profile views
  1. @Tsimi , I'm sorry, the last file I posted didn't have the tep_image mod included. Here the updated file with all my mods together and I also updated the version reference to 1.4. Please double check yourself for any case and update the package. rgds Rainer cm_pi_options_images.php
  2. Hello @Tsimi , hello @kymation, Another small mod: I added the code to auto create the "images/options/" directory during installation: // Create image directory for options images if(!is_dir(DIR_FS_CATALOG_IMAGES . 'options/'))mkdir(DIR_FS_CATALOG_IMAGES . 'options/', 0755); cm_pi_options_images.php
  3. Hello @Tsimi , hello @kymation, Sorry for the slow dropping suggestions. Working on the QTPro option image integration, I found that there is no option to avoid dropping the "option_image" and "sort_order" columns when uninstalling the product info options images content module. I needed this option for the QTPro integration and here is the result: Uninstall Removes Database entries Do you want to remove the options images database column in the products_attributes table when uninstall the module? All your existing options images entries will be lost, use this option only it you are sure that you will not use options images any more. True False public function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Module Version', 'MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_VERSION', '" . $this->version . "', 'The version of this module that you are running', '6', '0', 'tep_cfg_disabled(', now() ) "); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Options Images Module', 'MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_STATUS', 'True', 'Should the product options with images block be shown on the product info page?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_SORT_ORDER', '60', 'Sort order of display. Lowest is displayed first.', '6', '2', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Uninstall Removes Database entries', 'MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_REMOVE_DATA', 'False', 'Do you want to remove the options images database column in the products_attributes table when uninstall the module? All your existing options images entries will be lost, use this option only it you are sure that you will not use options images any more.', '6', '3', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); // ADDED FIELDS if (tep_db_num_rows(tep_db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='". DB_DATABASE . "' AND TABLE_NAME='products_attributes' AND COLUMN_NAME LIKE 'option_image'")) != 1 ) { tep_db_query("AlTER TABLE products_attributes ADD option_image varchar(127) NULL default NULL"); tep_db_query("ALTER TABLE products_attributes ADD sort_order int(11) NOT NULL default 0"); } } public function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); // DELETE ADDED FIELDS if ( defined('MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_REMOVE_DATA') && MODULE_CONTENT_PRODUCT_INFO_OPTIONS_IMAGES_REMOVE_DATA == 'True' ) { tep_db_query("ALTER TABLE products_attributes DROP COLUMN option_image"); tep_db_query("ALTER TABLE products_attributes DROP COLUMN sort_order"); } } Please use the modified attached file for your convenience and add it to your packages if you like. rgds Rainer cm_pi_options_images.php
  4. I took it from the old 2.2rc2a categories.php, that addon may be based on it too. rgds Rainer
  5. Hello @Tsimi, @kymation, I added check boxes to remove and/or delete option images to admin/product_attributes.php. Changes commented: " //add remove image function" lines 132-135 "//add delete image function" lines 136-140 "<!--- Add remove and delete image options --->" lines: 634-639 Another issue: There is one change which was not commented and produced me a headache and time to find the difference to merge the changes with a modified file: <!--- Start attibutes images ---> <form name="attributes" action="<?php echo tep_href_link('products_attributes.php', 'action=' . $form_action . '&' . $page_info); ?>" method="post" enctype="multipart/form-data"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <!--- End attibutes images ---> This part is different to a unmodified core file: enctype="multipart/form-data" I added the comment lines in the attached file. Please use the file for your convenience to update your packages. I'm also preparing option images support for QTPro BS. I'll upload it soon. kind regards Rainer products_attributes.php
  6. Hello @tsimi. I gave it a try and works great. I found a mod to use the "tep_image" function within the "tep_draw_pull_down_menu_options". Like this it is compatible with kiss it image thumbnailer and a 40px thumb is used instead of the full image size. if( tep_not_null( $values[$i]['image'] ) ) { $field .= ' data-content=\'' . tep_image('images/options/' . $values[$i]['image'], $option_name, '40', '40', null, 'false') . $option_name . '\''; } Another issue: Didn't find a way to remove the option image once it is added, other than in the database. Couldn't there be a button "Remove Image" be added in admin/product_attributes.php to do this? rgds Rainer
  7. This line must be also https: define('HTTPS_SERVER', 'https://yoursite.com'); rgds Rainer
  8. @@Mikepo, it's for security reason to filter sql injection attempts.
  9. Hello @@DivebombInc, I just tried with 2.3.4 BS and I can use all of these: ª!"·$%&/()=áéúóöç Which concrete characters would not work on your store? The only combinations which will be replaced are these you can see in the tep_sanitize function in includes/functions/general.php: function tep_sanitize_string($string) { $patterns = array ('/ +/','/[<>]/'); $replace = array (' ', '_'); return preg_replace($patterns, $replace, trim($string)); } rgds Rainer
  10. @@Lioelx, please install the product info options module. rgds Rainer
  11. Dobar dan @@goyan, First you need to add $shipping to the global list: function update_status() { global $order, $shipping; Then the conditions looks like this: if ($this->enabled == true) { if ($order->content_type == 'virtual' || $shipping['id'] != 'spu_spu' || $order->info['subtotal'] > 500 ) { $this->enabled = false; pozdrav Rainer
  12. @@goyan, first condition can be achieved with the ship2pay add-on: http://addons.oscommerce.com/info/8419 Or could be custom coded into the COD module. The second condition would need to be custom coded to the COD module. Have a look into the module. You could define the additional conditions in this section: // disable the module if the order only contains virtual products if ($this->enabled == true) { if ($order->content_type == 'virtual') { $this->enabled = false; } } rgds Rainer
  13. @@joe122joe, should work both, one is legacy change for old stores another is core code of new edge version which include hooks. Doesn't matter. For all other people using QTPRo it works. I gave you all information you need to investigate what's wrong. I can't loose more time asking 3 times for details. Follow instructions, fix your wrong DIR_FS_CATALOG definition, do the test trick with the die command in the hook until your checkout_process.php shows a blank page. Then remove the die command and substractions should work. FULL STOP
  14. @@joe122joe, then your DIR_FS_CATALOG definition in configuration.php must be wrong. So you say that you did all steps, but you changed steps on your own criteria and wonder that something dosn't work. You should have begin your very first post providing this information. I give up, sorry.
  15. @@joe122joe, when did you get this, after the change in application_top.php? please try to be precise and give good information, otherwise I'll give up soon. :-(