spidometrs Posted October 17, 2016 Share Posted October 17, 2016 Hi guys!My simple idea for a blog in osCommerce - you need to use only two conditions:- Add one variable to table categories_description - categories_style_type- Add one variable for the products table - products_blog_statusThen, in the files: new_products.php, product_listing.php, product_info.php: if ($categories_style_type == '1') { } elseif { ($categories_style_type == '2') } else {} So you can switch between different design for the product and for the blog. Further, the modules in a database query, add: end p.categories_style_type = '1' So you can disable this blog in the product modules. For comparison, look like a different page:- Category product page http://titanium.oscommerce.ru/dlya-muzhchin/obuv- Blog page category http://titanium.oscommerce.ru/blog/2016- Product page http://titanium.oscommerce.ru/dlya-muzhchin/dzhinsy-kurtki/dzhinsy/3301-dzhinsy-slim- Blog page http://titanium.oscommerce.ru/blog/2016/chem-nosit-palto In this case, it is fully supported by related content. Look, maybe you will like this idea. No outside url's in signatures allowed - thanks Link to comment Share on other sites More sharing options...
Guest Posted October 22, 2016 Share Posted October 22, 2016 Looks great. Care to share how you did the date? - http://titanium.oscommerce.ru/blog/2016 Link to comment Share on other sites More sharing options...
spidometrs Posted October 22, 2016 Author Share Posted October 22, 2016 Hello, Rolf! I did it very simply. The file includes/languages/english.php add line 28: define('DATE_FORMAT_SHORT_DAY', '%d'); define('DATE_FORMAT_SHORT_MONTH', '%B'); At the end of the file \includes\functions\general.php add: // DAY function tep_date_short_day($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = (int)substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); return strftime(DATE_FORMAT_SHORT_DAY, mktime($hour,$minute,$second,$month,$day,$year)); } // MONTH function tep_date_short_month($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = (int)substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); return strftime(DATE_FORMAT_SHORT_MONTH, mktime($hour,$minute,$second,$month,$day,$year)); } The file /includes/modules/product_listing.php use the date code: $prod_list_contents .= ' <div class="entry-timeline">' . "\n"; $prod_list_contents .= ' ' . tep_date_short_day($listing['products_date_added']) . '<span>' . substr(tep_date_short_month($listing['products_date_added']), 0, 3) . '</span>' . "\n"; $prod_list_contents .= ' <div class="timeline-divider"></div>' . "\n"; $prod_list_contents .= ' </div>' . "\n"; No outside url's in signatures allowed - thanks Link to comment Share on other sites More sharing options...
vampirehunter Posted October 22, 2016 Share Posted October 22, 2016 Hello, Rolf! I did it very simply. The file includes/languages/english.php add line 28: define('DATE_FORMAT_SHORT_DAY', '%d'); define('DATE_FORMAT_SHORT_MONTH', '%B'); At the end of the file \includes\functions\general.php add: // DAY function tep_date_short_day($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = (int)substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); return strftime(DATE_FORMAT_SHORT_DAY, mktime($hour,$minute,$second,$month,$day,$year)); } // MONTH function tep_date_short_month($raw_date) { if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false; $year = (int)substr($raw_date, 0, 4); $month = (int)substr($raw_date, 5, 2); $day = (int)substr($raw_date, 8, 2); $hour = (int)substr($raw_date, 11, 2); $minute = (int)substr($raw_date, 14, 2); $second = (int)substr($raw_date, 17, 2); return strftime(DATE_FORMAT_SHORT_MONTH, mktime($hour,$minute,$second,$month,$day,$year)); } The file /includes/modules/product_listing.php use the date code: $prod_list_contents .= ' <div class="entry-timeline">' . "\n"; $prod_list_contents .= ' ' . tep_date_short_day($listing['products_date_added']) . '<span>' . substr(tep_date_short_month($listing['products_date_added']), 0, 3) . '</span>' . "\n"; $prod_list_contents .= ' <div class="timeline-divider"></div>' . "\n"; $prod_list_contents .= ' </div>' . "\n"; is this going to be in a module? it would be great to have blog Link to comment Share on other sites More sharing options...
spidometrs Posted October 22, 2016 Author Share Posted October 22, 2016 it would be great to have blogis this going to be in a module It is impossible to create a module. This built-in capabilities. This is better than the Module. No outside url's in signatures allowed - thanks Link to comment Share on other sites More sharing options...
29gk Posted October 28, 2016 Share Posted October 28, 2016 I am also looking for a simple blog solution. If its possible, i would appreciate if not an addon, some directions based on your very good idea. Link to comment Share on other sites More sharing options...
vampirehunter Posted April 12, 2019 Share Posted April 12, 2019 is it possible to put some instructions together how to do this? Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 12, 2019 Share Posted April 12, 2019 @vampirehunter Please be aware that this thread is 2-1/2 years old. That said, @burt did a Blog module in his 29 days bundle. HTH Malcolm Link to comment Share on other sites More sharing options...
MrPhil Posted April 12, 2019 Share Posted April 12, 2019 Is it really worth the effort to come up with a blog or forum, and integrate it with osC? You're going to find yourself spending an incredible amount of time adding new features to your blog so that it looks decent and has an acceptable set of features. I would think it would be a much better investment (in your time) to just install a full blog (e.g., Wordpress) or forum (e.g., SMF) on the site and use that. If it is critical that a single signon work for both, I think something has been done along those lines in the past. If not, there's always a CMS (Wordpress, Joomla, Drupal) with a shopping cart module -- single signon, ability to arbitrarily jump all over the place, and consistent styling (at the cost of not as good a cart). Link to comment Share on other sites More sharing options...
Fredi Posted April 22, 2019 Share Posted April 22, 2019 For a real store, especially with an exclusive product, the information content module is very important. An important role is played by the Article Manager, but it has not been updated for a long time and is not very well connected with the content of goods. A blog is a convenient and good solution. Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
MrPhil Posted April 23, 2019 Share Posted April 23, 2019 It all depends on whether it's a one-way information flow (from seller to potential customer), or you need a two-way conversation. When someone says "blog", that sounds like they're asking for a conversational system. To meet expectations of functionality and ease of use, that's a whole application in and of itself. I would hesitate to try to build a whole new WordPress-like thing stuck on the side of osC. If such capability is needed, I would think it better to install something existing (like WP) and somehow tie it in to the store, such as through a shared ID/password. On the other hand, if all you need is to push information in one direction (store to customer), it might be worth the effort to come up with a mini-blog of some sort ("information content module"). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.