Jump to content
Latest News: (loading..)

vmn

Members
  • Content count

    67
  • Joined

  • Last visited

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.

  1. I just uploaded an addon enabling language support in Bootstrap Datepicker: https://apps.oscommerce.com/WKqEE&modular-boostrap-datepicker-i18n-bs
  2. Good point. The modular approach can now be found as an addon: https://apps.oscommerce.com/KgXJi&modular-image-descriptions-bs&c=images
  3. One bug so far. Escape slashes in the product name as follows: in includes/modules/header_tags/ht_product_colorbox.php find $(this).parent().attr("title", "' .$product_info['products_name'].'<br>" + $(this).attr("alt")); replace with $(this).parent().attr("title", "' .addslashes($product_info['products_name']).'<br>" + $(this).attr("alt")); and in admin/categories.php find $(this).parent().attr("title", "<?php echo $pInfo->products_name. '<br>';?>" + $(this).attr("alt")); replace with $(this).parent().attr("title", "<?php echo addslashes($pInfo->products_name). '<br>';?>" + $(this).attr("alt"));
  4. Here are some catalog screen shots related to my previous post: catalog.screens.shots.zip
  5. Here are some admin screen shots related to my previous post: admin.screen.shots.zip
  6. I finally decided to implement product image descriptions for Osc BS 2.3.4.1 CE This modification is based on the BS 2.3.4.1 CE package dated on Aug 28,2018. After this modification you can add an optional image description for each image in each catalog language. The desciprion is shown under the product name in the picture gallery. The picture gallery "Image current/total" text is also translatable. The cboxTitle are is enlarged in user.css. Implementation steps are (please see the enclosed installation instructions): 1. create the table "products_images_description" 2. modify the following files: -admin/includes/languages/english/categories.php -admin/includes/functions/general.php -admin/categories.php -admin/includes/database_tables.php -admin/includes/stylesheet.css (optional) -admin/includes/template_top.php (optional) -user.css -ext/colorbox/colorbox.css -includes/database_tables.php -includes/languages/english/product_info.php -includes/modules/content/product_info/cm_pi_gallery.php -includes/modules/header_tags/ht_product_colorbox.php The admin product preview image gallery is based on this addon: Protected Images for osC2_3_4 by Kevin L. Shelton 7-24-10 revised 5-18-2018 I have tested the mod by copying and deleting products and categories. mod_product_images_description.zip
  7. Thanks @raiva. It looks like the code base is spreading more and more. That's sad, in my opinion. I indeed had some leftovers of the old NON-BS PWA in the db. After if I cleaned those, I got stuck with the corrupted Firefox cache. I should've realized that faster. Even if I added some error_log lines into application.top, the line number shown in the error report remained unchanged.
  8. Not before the at sign. Should I test the mod with it?
  9. I made the following changes to use the global STORE_OWNER_EMAIL_ADDRESS value: in catalog/includes/modules/content/login/cm_pwa_login.php find: 'NOTE: This email address has been submitted by a visitor to our online-shop. If you were not this visitor, please send a message to: " . STORE_OWNER_EMAIL_ADDRESS . ". Thank you for your purchase and have a nice day.' replace with: 'NOTE: This email address has been submitted by a visitor to our online-shop. If you were not this visitor, please send a message to: %s. Thank you for your purchase and have a nice day.' in /catalog/includes/hooks/shop/checkout_process/pwa.php find: $email_order .= constant('MODULE_CONTENT_PWA_EMAIL_WARNING_' . strtoupper($language)) . "\n\n" . replace with: $email_order .= sprintf(constant('MODULE_CONTENT_PWA_EMAIL_WARNING_' . strtoupper($language)),STORE_OWNER_EMAIL_ADDRESS) . "\n\n" .
  10. Aargh! It was my Firefox cache problem. After clearing the cache, point #2 is solved. Everything is ok now.
  11. Please disregard the point #3. I realized that the texts can be changed, when editing the module. Currently I cannot do editing, because of notices. Points #1 and #2 are still valid. There are no errors, when I remove the module. After installing I get the same notices in different order.
  12. Hi and thanks for your great contribution. I'm upgrading my current 2.3.4 NON-BS shop to 2.3.4.1 CE. I'm using PWA for BS 3.0.4. I've got some questions/comments: 1. I think there is no need for "v2.2rc2a compatibility" stuff in orders.php. The stock 2.3.4.1 do not contain them. 2. I haven't yet figured out what's causing the notices below. Can you? I report all php errors to be sure I catch everything. I'm getting the following notices, when I click the "Login without Account Form" in Content Modules and then click edit. I can edit other Content modules without any errors. Notice: Constant MODULE_CONTENT_PWA_LOGIN_STATUS already defined in /opt/lampp/htdocs/catalog/admin/includes/application_top.php on line 75 Notice: Constant MODULE_CONTENT_PWA_LOGIN_CONTENT_WIDTH already defined in /opt/lampp/htdocs/catalog/admin/includes/application_top.php on line 75 Notice: Constant MODULE_CONTENT_PWA_LOGIN_SORT_ORDER already defined in /opt/lampp/htdocs/catalog/admin/includes/application_top.php on line 75 Notice: Constant GUEST_CHECKOUT_TELEPHONE already defined in /opt/lampp/htdocs/catalog/admin/includes/application_top.php on line 75 3. It would bee really nice, in my opinion, to traslate texts the same way as in other modules, i.e. in text files and not in the db. To change any text I have to remove and reinstall the module. In this case I have to reenter all other parameter changes as well. Is this correct? Thanks!
  13. I wanted to use user.css to change product image container attributes (e.g. #cboxTitle height) and add product's name to the shown picture. I don't know if someone has already done the stuff below in 2.3.4.1 CE. in includes/modules/header_tags/ht_product_colorbox.php find: $oscTemplate->addBlock('<link rel="stylesheet" href="ext/colorbox/colorbox.css" />' . "\n", 'header_tags'); immediately after add: $oscTemplate->addBlock('<link rel="stylesheet" href="user.css" />' . "\n", 'header_tags'); in user.css to make some more space for the products_name (see below): #cboxTitle {height:75px;color:#171515;} #cboxLoadedContent {padding-bottom:55px;} To use language dependent string instead of the generic "Image n of m" and to add product name under the shown product image find: if (in_array(basename($PHP_SELF), $pages_array)) { immediately after add: if (isset( $_REQUEST['products_id'])) { $product_info_query = tep_db_query("select pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_REQUEST['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$GLOBALS['languages_id'] . "'"); $product_info = tep_db_fetch_array($product_info_query); } replace this very long line $oscTemplate->addBlock('<script>var ImgCount ... $this->group); with $oscTemplate->addBlock( '<script>var ImgCount = $(".piGal").data("imgcount"); $(function() { $(\'.piGal\').css({\'visibility\': \'hidden\'}); $(\'.piGal\').photosetGrid({ gutter: \'5px\', layout: ""+ ImgCount +"", width: \'100%\', highresLinks: true,rel: \'pigallery\', onComplete: function() { $(\'.piGal\').css({\'visibility\': \'visible\'}); $(\'.piGal a\').colorbox({maxHeight: \'90%\', maxWidth: \'90%\', title: \'' . $product_info['products_name'] . '\', current:\'' . TEXT_CURRENT_OF_TOTAL .'\', rel: \'pigallery\'}); $(\'.piGal img\').each(function() { var imgid = $(this).attr(\'id\') ? $(this).attr(\'id\').substring(9) : 0; if ( $(\'#piGalDiv_\' + imgid).length ) { $(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid }); } }); }});});</script>', $this->group);} in includes/languages/english/product_info.php add define('TEXT_CURRENT_OF_TOTAL','Image {current}/{total}'); and in includes/languages/finnish/product_info.php define('TEXT_CURRENT_OF_TOTAL','Kuva {current}/{total}'); Comments?
  14. vmn

    State Selector for BS

    Most of our customers are from Finland, i.e. no zones. I just do not love unnecessary input fields.
  15. vmn

    State Selector for BS

    Hi, If a country does not have zones, we do not need the state input entry. This is what I did: in includes/modules/checkout_new_address.php includes/modules/checkout_new_address.php account_pwa.php (I haven't tested this yet) replace the block: <?php if (ACCOUNT_STATE == 'true') { ?> ... <?php } ?> with the following lines: <?php if (ACCOUNT_STATE == 'true') { ?> <div id="results" class="form-group has-feedback"> <?php $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . $country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . $country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo '<label for="inputState" class="control-label col-sm-3">' . ENTRY_STATE .'</label>'; echo '<div class="col-sm-9">'; echo tep_draw_pull_down_menu('state', $zones_array, (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), 'required aria-required="true" id="inputState"'); echo FORM_REQUIRED_INPUT; echo '</div>'; if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; } ?> </div> <?php } ?> in get_states.php find: if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from zones where zone_country_id = '" . (int)$state . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array, '', 'required aria-required="true" id="inputState"'); echo FORM_REQUIRED_INPUT; } else { echo tep_draw_input_field('state', NULL, 'id="inputState" class="form-control" required aria-required="true" placeholder="' . ENTRY_STATE . '"'); echo FORM_REQUIRED_INPUT; } replace with: if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from zones where zone_country_id = '" . (int)$state . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo '<label for="inputState" class="control-label col-sm-3">' . ENTRY_STATE .'</label>'; echo '<div class="col-sm-9">'; echo tep_draw_pull_down_menu('state', $zones_array, '', 'required aria-required="true" id="inputState"'); echo FORM_REQUIRED_INPUT; echo '</div>'; }
×