PDA

View Full Version : issues on social bookmarking v2



elaineben
07-08-2011, 04:42 AM
i have followed all the steps except no. 4
How To Install

--------------

Step 1:

Backup your files and database! This is always the first step with the installation of any new OSCommerce contributions.

Step 2:

The file social_bookmarks.php should be uploaded to /includes/modules/social_bookmarks.php


Step 3:

The folder /images/bookmark_icons should be uploaded to /images/

Step 3:

The file /includes/languages/<your language(s)/social_bookmarks.php should be uploaded to your language directory

Step 4:

OPEN /product_info.php with a text editor


Look for:

-------------------------------------------------------------------------------

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

-------------------------------------------------------------------------------



Step 4a:
add the following after it:
-------------------------------------------------------------------------------


<!-- social bookmarks start //-->
<?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?>

<!-- social bookmarks finish //-->



-------------------------------------------------------------------------------

Step 5:

OPEN catalog/includes/filenames.php

// Social Bookmark v2
define('FILENAME_SOCIAL_BOOKMARKS', 'social_bookmarks.php') ;

Add this line at the end of the file just before ?>
-------------------------------------------------------------------------------

when i opened /product_info.php, the codes where different from the one given. it looks like this and the one required is not shown:/*
$Id: product_info.php 956 2011-01-05 19:10:37Z [email protected] $

osCmax e-Commerce
osCMax - osCommerce Maximized | osCmax shopping cart software (http://www.oscmax.com)
adapted for Separate Pricing Per Customer v4.2 2007/06/23, Hide products and categories from groups 2008/08/05 by wkdwich

Copyright 2000 - 2011 osCmax

Released under the GNU General Public License
*/

// Most of this file is changed or moved to BTS - Basic Template System - format.
// For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
// catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
// (Sub 'fallback' with your current template to see if there is a template specific file.)

require('includes/application_top.php');

// LINE ADDED: MOD - Added for Dynamic MoPics v3.000
require(DIR_WS_FUNCTIONS . 'dynamic_mopics.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

// $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
// $product_check = tep_db_fetch_array($product_check_query);
// BOF Separate Pricing Per Customer, Hide products and categories from groups
$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) left join " . TABLE_CATEGORIES . " c using(categories_id) where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', categories_hide_from_groups) = 0");
$product_check = tep_db_fetch_array($product_check_query);
// EOF Separate Pricing Per Customer, Hide products and categories from groups

// BOF: Extra Product Fields
$epf = array();
if ($product_check['total'] > 0) {
$epf_query = tep_db_query("select * from " . TABLE_EPF . " e join " . TABLE_EPF_LABELS . " l where e.epf_status and (e.epf_id = l.epf_id) and (l.languages_id = " . (int)$languages_id . ") and l.epf_active_for_language order by epf_order");
while ($e = tep_db_fetch_array($epf_query)) { // retrieve all active extra fields
$field = 'extra_value';
if ($e['epf_uses_value_list']) {
if ($e['epf_multi_select']) {
$field .= '_ms';
} else {
$field .= '_id';
}
}
$field .= $e['epf_id'];
$epf[] = array('id' => $e['epf_id'],
'label' => $e['epf_label'],
'uses_list' => $e['epf_uses_value_list'],
'multi_select' => $e['epf_multi_select'],
'columns' => $e['epf_num_columns'],
'display_type' => $e['epf_value_display_type'],
'show_chain' => $e['epf_show_parent_chain'],
'search' => $e['epf_advanced_search'],
'keyword' => $e['epf_use_as_meta_keyword'],
'field' => $field);
}
$query = "select p.products_date_added, p.products_last_modified, pd.products_name";
foreach ($epf as $e) {
if ($e['keyword']) $query .= ", pd." . $e['field'];
}
$query .= " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'";
$pname = tep_db_fetch_array(tep_db_query($query));
$datemod = substr((tep_not_null($pname['products_last_modified']) ? $pname['products_last_modified'] : $pname['products_date_added']), 0, 10);
} else {
$pname = TEXT_PRODUCT_NOT_FOUND;
$datemod = date('Y-m-d');
}
// EOF: Extra Product Fields

$content = CONTENT_PRODUCT_INFO;

$javascript = $content . '.js.php';


include (bts_select('main')); // BTSv1.5


require(DIR_WS_INCLUDES . 'application_bottom.php');
?>


i kept on looking for these tags:

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

and i found them on catalog/my templates/contents/product_info.tpl.php
although phrasing is somewhat different again. it is like this:

</td>
<?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?>
<td align="center" class="smallText" width="60%"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_short($product_info['products_date_available'])); ?></td>
<?php } else { ?>
<td align="center" class="smallText" width="60%"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_short($product_info['products_date_added'])); ?></td>
<?php } ?>
<!-- social bookmarks start //-->
<?php

i did try to add the file required which is:

<!-- social bookmarks start //-->
<?php

include(DIR_WS_MODULES . FILENAME_SOCIAL_BOOKMARKS);

?>

<!-- social bookmarks finish //-->


but i just can't make the social icons appear in my site.

i do not know anymore what to do. i am using osmaxv2.5 and it is a fresh install..please help.

this is the url to my product info page. (http://deals.onlydeals.webbeo.info/catalog/product_info.php?products_id=1)

thanks again for the help

elaineben
07-08-2011, 08:07 PM
please anyone who could help with this. if not then, could anyone suggest a good way to put social bookmarks in the site. thanks again

elaineben
07-08-2011, 08:56 PM
i was able to add one with the help of social twist tell a friend....good bookmarking. just need some tweaks where you want to place it.

peterittner
07-14-2011, 12:17 PM
Ok this doesn't apply to what you're attempting to do but i decided to go with AddThis(.com) analytics in February and just yesterday the Google +1 add-on.

Drag and drop a few lines of code into /catalog/templates/yourtemplate/content/article_info.tpl.php and /catalog/templates/yourtemplate/content/product_info.tpl.php and you're golden with analytics similar to google.

It's reeeeeally good - we've come a long way since those add-ons were developed. =) You can look outside the OSC box for solutions.