Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

vmn

Members
  • Posts

    204
  • Joined

  • Last visited

  • Days Won

    5

vmn last won the day on February 2 2021

vmn had the most liked content!

Profile Information

  • Real Name
    Veli-Matti
  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

vmn's Achievements

  1. Hello, I just installed the version 1.4.0 (in Phoenix 1.0.7.14) and found a bug preventing adding 'Required ip': in includes/modules/store/st_store_mode.php in the function htaccess_backup the line: if ( defined('MODULE_STORE_MODE_ALLOWED_IPS ') && tep_not_null(MODULE_STORE_MODE_ALLOWED_IPS) ) { contains an extra space before the closing apostrophe and should be if ( defined('MODULE_STORE_MODE_ALLOWED_IPS') && tep_not_null(MODULE_STORE_MODE_ALLOWED_IPS) ) {
  2. And, in the modern world: $src = Text::ltrim_once(language::map_to_translation('images/' . DEFAULT_IMAGE), DIR_FS_CATALOG);
  3. In 1.0.7.14 the following functions are deprecated in admin: tep_session_id tep_session_name tep_session_register tep_session_is_registered tep_session_unregister It seems to be working with fixes for admin/attributeManager/includes/attributeManagerHeader.inc.php admin/attributeManager/includes/attributeManagerSessionFunctions.inc.php included in the zip. fixes.for.1.0.7.14.zip
  4. Hello @raiwa and thanks again for your great addon. I wanted to have language specific default images. To achieve this I made the following change to kiss_it_image.php: if (defined('DEFAULT_IMAGE') && tep_not_null(DEFAULT_IMAGE) && !is_file(DIR_FS_CATALOG . $src)) { //VMN$src = DEFAULT_IMAGE; $src = 'includes/languages/' . $_SESSION['language'] . '/images/' . DEFAULT_IMAGE; } elseif ( (empty($src) || ($src == 'images/')) && (IMAGE_REQUIRED == 'false') ) { return false; } I wonder whether you would like to include this change into a future version of the addon:).
  5. OK, I thought you might be interested. I have more customised implementation of this supporting image descriptions, hiding htmlcontent, because we are not using it, etc. So, this is a one-time effort.
  6. Hi, I cloned the includes/modules/pi/product_info/pi_gallery_kissit.php gallery functionality to admin/categories product images. The features include: -show product image thumbnails -show image preview, when uploading product images -show product image gallery Tested in Phoenix 1.0.7.9 - 1.0.7.12 If you find this useful, please feel free to use it in any way you like. Here's a screen shot: categories.product.images.hook.zip
  7. There seems to be some confusion about the versions of this addon. I've downloaded 1.0.5 from this thread. I think it contains all the features mentioned in two previous posts. One of my hooks create dynamic content to categories.php. Tinymce was not activated before this change: <script> $(document).ready(function() { //added tinymce.init({ ... }); }); //added </script> Also adding autoresize into plugins is quite handy for me. Our product descriptions are not that long.
  8. You're welcome. I'm not using watermarks. I also tried admin side thumbs. Empty folders are created there, too. For some reason multiple thumbs were placed on some product lines in the category product listing, because your jquery code found multiple th elements to prepend the image to. I couldn't figure out why, so I removed the admin side thumbs functionality. It's not important to me. I was just curious:).
  9. Hi, I'm using Phoenix 1.0.7.11 and KissIT 3.4.2 and noticed that it creates empty folders for gallery images. I verified this using stock versions of 1.0.7.11 and KissIT. The function tep_image in kiss_it_image.php first creates a folder and the function _generateThumbnail in Image_Helper.php does not need it, because thumbs are not used for gallery images. This fix works for me. No empty folders will be created after applying it. In kiss_it_image.php tep_image replace the lines between // Create thumbs sub dirs and .htaccess. and // End create subdirectory and .htaccess. as follows //VMN NOT NEEDED Create thumbs sub dirs and .htaccess. //VMN build thumbs sub dir path, in case it's needed $thumbs_dir_path = str_replace('images/', 'images/' . KISSIT_THUMBS_MAIN_DIR . $width .'_'.$height.'/', dirname($src) . '/'); //VMN MOVED TO Image_Helper _generateThumbnail if(!is_dir($thumbs_dir_path)) { //VMN MOVED TO Image_Helper _generateThumbnail mkdir($thumbs_dir_path,0775,true); //VMN MOVED TO Image_Helper _generateThumbnail } //VMN NOT NEEDED because sub dirs are created using mkdir('path',mode,true) //VMN NOT NEEDED $thumbs_dir = ''; //VMN NOT NEEDED $thumbs_dir_paths = explode("/",$thumbs_dir_path); //VMN NOT NEEDED for ($i=0, $n=sizeof($thumbs_dir_paths); $i<$n; $i++) { //VMN NOT NEEDED $thumbs_dir .= $thumbs_dir_paths[$i] . '/'; //VMN NOT NEEDED if(!is_dir($thumbs_dir)) { //VMN NOT NEEDED mkdir($thumbs_dir, 0775); //VMN NOT NEEDED } //VMN NOT NEEDED create .htacces protection like in main image dir //VMN NOT NEEDED if (($i==$n-1) && (!is_file($thumbs_dir . '.htaccess')) ) { //VMN NOT NEEDED $hpname = $thumbs_dir . '.htaccess'; //VMN NOT NEEDED if ($hp = fopen($hpname,'w')) { //VMN NOT NEEDED fwrite($hp,$htacces); //VMN NOT NEEDED fclose($hp); //VMN NOT NEEDED } //VMN NOT NEEDED } //VMN NOT NEEDED} // end for //VMN NOT NEEDED End create subdirectory and .htaccess. There is no unnecessary creation of thumbs subfolders and htaccess files. The main thumbs folder htaccess will protect supbfolders as well. The only reference of $thumbs_dir_path is in $image = new Image_Helper(...). ================ in Image_Helper.php _generateThumbnail below the line: //make sure the thumbnail directory exists. 1. comment out/remove the lines //VMN NOT NEEDED if ( !is_writable ( $this->thumbs_dir_path ) ) { //VMN NOT NEEDED trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE ); //VMN NOT NEEDED } //VMN The check below is already done in _checkImage returning 'no_thumb_required' //VMN NOT NEEDED if ( is_readable ( $this->_thumb_src ) ) { //VMN NOT NEEDED $this->_calculated_width = (int)$this->attributes['width']; //VMN NOT NEEDED $this->_calculated_height = (int)$this->attributes['height']; //VMN NOT NEEDED return $this->src = $this->_thumb_src; //VMN NOT NEEDED } 2. add //VMN moved from kiss_it_image.php if(!is_dir($this->thumbs_dir_path)) { mkdir($this->thumbs_dir_path,0775,true); // true ->Allows the creation of nested directories specified in the pathname } Do you see any problems with this approach?
  10. Hi, I've upgraded Phoenix from 1.0.7.9->1.0.7.10->1.0.7.11 and noticed that the Gallery Kissit setup stopped working. I think I managed to upgrade pi_gallery_kissit.php to be compatible with 1.0.7.11. Maybe you already have done that. Here's my stuff. pi_gallery_kissit.zip
  11. Sorry, I must have missed something. As to 1.2.9 I think that there is no infoBoxContent style any more in 1.0.7.9. I think I stick to my version with one core change. Hopefully the core in the future will contain this extra hook. I also modify the style of the order list and add order language to the edit link. BTW, I moved the extra hook to the end of this if statement in orders.php before the last break stmt. if (($oInfo ?? null) instanceof objectInfo) { ... echo $OSCOM_Hooks->call('orders', 'orderList'); }
  12. This was an obsolete comment regarding the version 1.2.8. I was writing a comment to when a note of a new version was posted
  13. @SCH_001This was discussed in April 2018 in this topic. I uploaded my version then. As I pointed out my version is heavily mofified.
  14. I think managed to port my OSC 2.3.4.1 BS heavily modified order editor to Phoenix 1.0.7.9. I haven't tested it thoroughly yet. At least taxes are correctly calculated. I only use the following modified hooks from this addon version 1.2.8. The only change to core is to add the 'orderList' hook call to admin/orders.php, as instructed in the readme. *********** includes/hooks/admin/siteWide/listOrders.php <?php /* $Id$ add edit orders to admin / orders.php author: John Ferguson @BrockleyJohn [email protected] osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2019 SE Websites Released under the MITc License without warranty express or implied Modified by vmn for 1.0.7.9 */ class hook_admin_siteWide_listOrders { function listen_injectSiteEnd() { global $PHP_SELF, $oInfo; if (basename($PHP_SELF) == 'orders.php') { $comment = '<!-- ' .__METHOD__ . ' -->'; if (isset($oInfo) && is_object($oInfo)) { $link = tep_href_link('edit_orders.php', 'oID=' . $oInfo->orders_id); return <<<EOD $comment <script> $(function() { $('a.btn-warning').attr('href','$link'); }); </script> $comment EOD; } } } } *********** includes/modules/ hooks/admin/orders_edit_order.php <?php /* $Id$ add edit orders to admin / orders.php author: John Ferguson @BrockleyJohn [email protected] osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2018 osCommerce Released under the GNU General Public License Modified by vmn for 1.0.7.9 */ class hook_admin_orders_edit_orders { function listen_orderTab() { $comment = '<!-- ' .__METHOD__ . ' -->'; $button = tep_draw_bootstrap_button(IMAGE_EDIT, 'fas fa-cogs', tep_href_link('edit_orders.php', tep_get_all_get_params(['oID', 'action']) . 'oID=' . $_GET['oID'] . '&action=edit'), null, null, 'btn-warning mr-2'); $output = <<<EOD $comment <script> $('a.btn-info:first').before('$button'); </script> $comment EOD; return $output; } }
  15. Unfortunately, multiple languages are not supported. So, I can't see much use for htmlcontent. I've implemented optional multi-lingual description text for product images in v2.3.4.1 CE (BS). Right now I'm learning hooks and have made the same (still testing) for Phoenix 1.0.7.9 without changing the core. Gallery modules are the next thing to override.
×
×
  • Create New...