Latest News: (loading..)

raiwa

♥Ambassador
  • Content count

    2,249
  • Joined

  • Last visited

  • Days Won

    71

raiwa last won the day on October 21

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

36,040 profile views
  1. pushed update with the following changes: optional hide on checkout pages (login.php, checkout_shipping.php, checkout_payment.phpheckout_confirmation.php and checkout_success) select on which pages to hide each area by page-checkbox list select each group to hide (navbar, header area, boxes, footer and footer suffix define content width if side columns are hidden. Allows to control if main content gets stretched or keeps space for side columns optional keep showing store logo if header area is hidden. general clean up of class extension following Henry's example where possible.
  2. @wHiTeHaT, I got it to work so far modifying the parent class. If I try to create the extension and leave the parent class unmodified, the modules work, but the blocks do not. If I just comment out within the buildBlocks function: // $mb->execute(); the side columns still show. this is my template class extension ( do not watch my checkPages function, it will be simplified): if (class_exists('oscTemplate')) { class oscTemplateExt extends oscTemplate { public $_blocks = array(); public $_content = array(); public $_grid_container_width = 12; public $_grid_content_width = BOOTSTRAP_CONTENT; public $_grid_column_width = 0; // deprecated public $_data = array(); public $_hide_column = false; public $_pages = array(); function __construct() { global $PHP_SELF, $oscTemplate; $this->_blocks = $oscTemplate->_blocks; $this->_content = $oscTemplate->_content; $this->_grid_container_width = $oscTemplate->_grid_container_width; $this->_grid_column_width = $oscTemplate->_grid_column_width; } function getGridContentWidth() { if ( $this->_hide_column == true ) { return MODULE_HEADER_TAGS_SLIM_CHECKOUT_CONTENT_WIDTH; } else { return $this->_grid_content_width; } } function buildBlocks() { global $PHP_SELF, $language; if ( defined('TEMPLATE_BLOCK_GROUPS') && tep_not_null(TEMPLATE_BLOCK_GROUPS) ) { $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS); foreach ($tbgroups_array as $group) { $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED'; if ( defined($module_key) && tep_not_null(constant($module_key)) ) { $modules_array = explode(';', constant($module_key)); foreach ( $modules_array as $module ) { $class = basename($module, '.php'); if ( !class_exists($class) ) { if ( file_exists('includes/languages/' . $language . '/modules/' . $group . '/' . $module) ) { include('includes/languages/' . $language . '/modules/' . $group . '/' . $module); } if ( file_exists('includes/modules/' . $group . '/' . $module) ) { include('includes/modules/' . $group . '/' . $module); } } if ( class_exists($class) ) { $mb = new $class(); //echo '<br><br>$class' . $class; if ( $mb->isEnabled() && !in_array(basename($PHP_SELF), $this->checkPages($class))) { $mb->execute(); } } } } } } } function getContent($group) { global $PHP_SELF, $language; if ( !class_exists('tp_' . $group) && file_exists('includes/modules/pages/tp_' . $group . '.php') ) { include('includes/modules/pages/tp_' . $group . '.php'); } if ( class_exists('tp_' . $group) ) { $template_page_class = 'tp_' . $group; $template_page = new $template_page_class(); $template_page->prepare(); } foreach ( $this->getContentModules($group) as $module ) { if ( !class_exists($module) ) { if ( file_exists('includes/modules/content/' . $group . '/' . $module . '.php') ) { if ( file_exists('includes/languages/' . $language . '/modules/content/' . $group . '/' . $module . '.php') ) { include('includes/languages/' . $language . '/modules/content/' . $group . '/' . $module . '.php'); } include('includes/modules/content/' . $group . '/' . $module . '.php'); } } if ( class_exists($module) ) { $mb = new $module(); //echo '<br><br>$module' . $module; //echo '<br><br>$module' . print_r($this->checkPages($module)); if ( $mb->isEnabled() && !in_array(basename($PHP_SELF), $this->checkPages($module))) { $mb->execute(); } } } if ( class_exists('tp_' . $group) ) { $template_page->build(); } if ($this->hasContent($group)) { return implode("\n", $this->_content[$group]); } } function checkPages($class){ //$class what is called in the buildblocks and content modules ($module) global $PHP_SELF; if (strtok($class, '_') == 'bm') { $module_group_prefix = strtok($class, '_'); } elseif (strtok($class, '_') == 'cm') { $module_group_prefix = (strtok($class, '_'.strtok($class, '_'))); } $hide_array[$module_group_prefix] = array(); $hide_pages = array('login.php', 'shopping_cart.php' , 'checkout_shipping.php', 'checkout_payment.php', 'checkout_confirmation.php', 'checkout_success.php'); $hide_array['navbar'] = explode(',', MODULE_HEADER_TAGS_SLIM_CHECKOUT_NAVBAR); $hide_array['header'] = explode(',', MODULE_HEADER_TAGS_SLIM_CHECKOUT_HEADER); $hide_array['bm'] = explode(',', MODULE_HEADER_TAGS_SLIM_CHECKOUT_BOXES); $hide_array['footer'] = explode(',', MODULE_HEADER_TAGS_SLIM_CHECKOUT_FOOTER); $hide_array['footer_suffix'] = explode(',', MODULE_HEADER_TAGS_SLIM_CHECKOUT_FOOTER_SUFFIX); for ($i=0; $i<sizeof($hide_pages); $i++) { if ($hide_array['navbar'][$i] == 0) { $hide_array['navbar'][$i] = $hide_pages[$i]; } else { unset($hide_array['navbar'][$i]); } if ($hide_array['header'][$i] == 0) { $hide_array['header'][$i] = $hide_pages[$i]; } else { unset($hide_array['header'][$i]); } if ($hide_array['bm'][$i] == 0) { $hide_array['bm'][$i] = $hide_pages[$i]; } else { unset($hide_array['bm'][$i]); } if ($hide_array['footer'][$i] == 0) { $hide_array['footer'][$i] = $hide_pages[$i]; } else { unset($hide_array['footer'][$i]); } if ($hide_array['footer_suffix'][$i] == 0) { $hide_array['footer_suffix'][$i] = $hide_pages[$i]; } else { unset($hide_array['footer_suffix'][$i]); } } // echo '<br><br>$hide_array[navbar]' . print_r($hide_array['navbar']); // echo '<br><br>$hide_array[header]' . print_r($hide_array['header']); // echo '<br><br>$hide_array[bm]' . print_r($hide_array['bm']); // echo '<br><br>$hide_array[footer]' . print_r($hide_array['footer']); // echo '<br><br>$hide_array[footer_suffix]' . print_r($hide_array['footer_suffix']); if (in_array(basename($PHP_SELF), $hide_array['bm'])) $this->_hide_column = true; // echo '<br><br>$class' . $class; // echo '<br><br>$hide_array[header' . print_r($hide_array['header']); /* $pages_array = array(); if ( isset($hide_array[$module_group_prefix]) ) { foreach ($hide_array[$module_group_prefix] as $page) { $page = trim($page); if (!empty($page)) { $pages_array[] = $page; } } } */ return $hide_array[$module_group_prefix]; } } } Thank You
  3. Hello Kevin,

    I had a look into your new extra product fields version and found that it seems it is still addressed for 2.3.4 OsC standard only.

    It would be very nice if you could update it for 2.3.4 BS responsive community version.

     

    rgds

    Rainer

  4. new version updated in git hub: module hide list for each checkout page class extension moved into ht module class extension clean up in direction Henry pointed out (still much more to do, I'll go for it tomorrow.) Update: uninstall ht, replace ht, install ht, remove class extension. Once this is clean and well working, I'll try to go for a separate admin page with control over each module and any page.
  5. OK I'll have a deeper look. I'm right now working on the settings and pass them into hide array (groups/pages).
  6. OK, but in your example you go for $module, I go for $group (navbar, header...)
  7. Thank you, but I still feel that it is overengineered to control each module individually. I continue with the purpose to slim up the checkout process by areas/group`s. Anyway you of course have given great ideas to me to do it in a better and easier way.
  8. I do not see how to apply the group/module to page matrix only using this function
  9. You mean to do it in the template class (extension)? And how to control additional add-on modules? MODULE_BOXES_INSTALLED, MODULE_CONTENT_INSTALLED etc?
  10. Sorry there is a bug, I meant instead of: function get_default_pages() { return explode(',', CHECKOUT_PAGES); } this: function get_pages() { $pages_array = explode(',', CHECKOUT_PAGES); // check if pages exist for ($i=0, $n=sizeof($pages_array); $i<$n; $i++) { if ( !file_exists(DIR_FS_CATALOG . $pages_array[$i]) ) unset($pages_array[$i]); } return $pages_array; } And then: function module_..._edit_pages($values, $key) { global $PHP_SELF; $values_array = get_pages(); $output = ''; foreach ($files_array as $file) { $output .= tep_draw_checkbox_field('ht_datepicker_jquery_file[]', $file, in_array($file, $values_array)) . ' ' . tep_output_string($file) . '<br />'; } if (!empty($output)) { $output = '<br />' . substr($output, 0, -6); } .....................
  11. @burt, I have this developed like an add-on, that's why I prefer to use a Header Tag. If there is a real interest to convert it to core, I would be happy to ucreate a fork and use a separate new admin page instead of the Header Tag and apply the extension class modifications to the parent class. Another possibility which would require core changes: If we would like to controle each individual module like @wHiTeHaT suggested, we could do this: Add a configuration constant to "My store" holding the list of controlled pages: "CHECKOUT_PAGES". Add the "edit_pages" and "show pages" functions to all modules function get_default_pages() { return explode(',', CHECKOUT_PAGES); } function __construct() { ........... $check_flag = false; foreach (explode(';', MODULE_...._PAGES) as $page) { $page = trim($page); if (!empty($page)) { $pages_array[] = $page; } if (in_array(basename($PHP_SELF), $pages_array)) { $check_flag = true; } } if ($check_flag == false) { $this->enabled = false; } } This allows full flexibility to control any page without the need to show a long list of irrelevant pages in each module. Even third party (add-on) pages can be easy added. But requires core changes in each box, content, and navbar module.
  12. @discxpress, it's not all or nothing. Just hide the side columns and footer and leave the navbar and/or header area showinr => no one gets stucked in the checkout.
  13. page list for each module group: Option B
  14. Agree, each shopowner can choose, I'll add login to the addressable pages.
  15. I would say, even contact us is not needed during checkout.