Jump to content

Recommended Posts

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_status

Then, 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.

Edited by spidometrs

No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

it would be great to have blog

is 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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@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


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

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).


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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").


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozenpatches or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×