Jump to content
Pronux

Tab Menu Section (TMS) and Pronux TMS For Admin Support Thread

Recommended Posts

Firstly

congrats on 2 great contribs.

 

I may be barking up the wrong tree but I was wondering.....

I, like many others only use English language on my site. Therefore is it possible to include another language( but as the language box is removed making it impossible for user to change the default language) and use the 2nd language to add info for one of the product tabs, therefore negating the need to manually add info via the db?

For example

in admin, under product description, in English box you have the normal english description.

But in the french box you could put the product specification and change the call function in product_info.php to add the french description into tab 2 for specification and maybe the german dscription for availability?

 

In my mind, it seems feasable, but then so many things are feasable in my mind!

If it is possible, then surely this may make the TMS more aceptable to so many users who could use a language not used to add product info to tabs!!

 

Only question is, how would you create the call function?!!

 

$TMS->tab[1]['content'] = $product_info['products_description'];
$TMS->tab[2]['content'] = 'french product description';
$TMS->tab[3]['content'] = 'german product description';

Just let me know if im being stoopid!!

Edited by The Smoothy

Share this post


Link to post
Share on other sites

Hi not sure if this thread has died but I need help with my tms . I have made sure I am viewing the 'actual size' of the web page and viewed it in safari and chrome. It looks like something to do with squishing into a too small width but I have little knowledge of all of this. Sorry thanks!!

 

http://i49.tinypic.com/23m2aok.png

Edited by BeckyLiu

Share this post


Link to post
Share on other sites

Hello Pronux,

 

Thanx for the nice MOD, if have installed it in my site.

 

the admin was good..but as some wrote there was no possibily to insert the data into the database..i have not much expirience with programming...but i get it together so it works for me wink.gif

 

for those who want to update the admin section this is what i did... ATTENTION...i could fix a problem Pronus add give me..so the nice box from Pronux doesn't work in my admin section..perhaps Pronux does have a solution.

 

What I did:

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

 

1. catalog/admin/catagories: (i have 3 tabs at this moment, the original DESCIPTION file..added SPECIFICATIONS and EXTRA INFO, so look for the changes I made)

============================

 

somewhere around:325

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

$language_id = $languages[$i]['id'];

 

$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),

'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),

'products_specification' => tep_db_prepare_input($HTTP_POST_VARS['products_specification'][$language_id]),

'products_extra_info' => tep_db_prepare_input($HTTP_POST_VARS['products_extra_info'][$language_id]),

'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

 

somewher around:385

$dup_products_id = tep_db_insert_id();

 

$description_query = tep_db_query("select language_id, products_name, products_description, products_specification, products_extra_info, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");

while ($description = tep_db_fetch_array($description_query)) {

tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_specification, products_extra_info, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_specification']) . "', '" . tep_db_input($description['products_extra_info']) . "', '" . tep_db_input($description['products_url']) . "', '0')");

}

 

tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");

$products_id = $dup_products_id;

}

 

somewhere around: 450

<!-- body_text //-->

<td width="100%" valign="top">

<?php

if ($action == 'new_product') {

$parameters = array('products_name' => '',

'products_description' => '',

'products_specification' => '',

'products_extra_info' => '',

'products_url' => '',

'products_id' => '',

'products_quantity' => '',

'products_model' => '',

'products_image' => '',

 

somewhere around: 478

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_specification, pd.products_extra_info, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_image_array, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product = tep_db_fetch_array($product_query);

$products_image_array = unserialize($product['products_image_array']);

if (!is_array($products_image_array)) $products_image_array = array();

// EOF Simple multi image addon

$pInfo->objectInfo($product);

} elseif (tep_not_null($HTTP_POST_VARS)) {

$pInfo->objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_specification = $HTTP_POST_VARS['products_specification'];

$products_extra_info = $HTTP_POST_VARS['products_extra_info'];

$products_url = $HTTP_POST_VARS['products_url'];

 

somewhere around: 634 <=== this is the part for Pronux add-on

 

<script language="javascript"><!--

updateGross();

//--></script>

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main1" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

 

 

 

 

 

 

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main1" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_SPECIFICATION; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main"><?php echo tep_draw_textarea_field('products_specification[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_specification[$languages[$i]['id']]) ? stripslashes($products_specification[$languages[$i]['id']]) : tep_get_products_specification($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

 

 

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main1" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_EXTRA_INFO; ?></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>

<td class="main"><?php echo tep_draw_textarea_field('products_extra_info[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_extra_info[$languages[$i]['id']]) ? stripslashes($products_extra_info[$languages[$i]['id']]) : tep_get_products_extra_info($pInfo->products_id, $languages[$i]['id']))); ?></td>

</tr>

</table></td>

</tr>

<?php

}

?>

 

 

somewhere around: 793

 

</tr>

</table></form>

<?php

} elseif ($action == 'new_product_preview') {

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_specification = $HTTP_POST_VARS['products_specification'];

$products_extra_info = $HTTP_POST_VARS['products_extra_info'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

// Simple multi image addon

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_specification, pd.products_extra_info, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_image_array, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

somewhere around: 816

 

$form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product';

 

echo tep_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');

 

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {

$pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_specification = tep_get_products_specification($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_extra_info = tep_get_products_extra_info($pInfo->products_id, $languages[$i]['id']);

$pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']);

} else {

$pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);

$pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);

$pInfo->products_specification = tep_db_prepare_input($products_specification[$languages[$i]['id']]);

$pInfo->products_extra_info = tep_db_prepare_input($products_extra_info[$languages[$i]['id']]);

$pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);

}

 

somewhere around:843

 

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . '<b><u>' . TEXT_PRODUCTS_DESCRIPTION . '</u></b><br><br>' . $pInfo->products_description . '<br><br><b><u>' . TEXT_PRODUCTS_SPECIFICATION . '</u></b><br><br>' . $pInfo->products_specification. '<br><br><b><u>' . TEXT_PRODUCTS_EXTRA_INFO . '</u></b><br><br>' . $pInfo->products_extra_info; ?></td>

</tr>

<?php

if ($pInfo->products_url) {

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

 

somewhere around: 935

 

$languages = tep_get_languages();

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_specification[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_specification[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_extra_info[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_extra_info[$languages[$i]['id']])));

echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));

}

echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

// Simple multi image addon

$i=1;reset($products_image_array);

while (list($key, $value) = each($products_image_array))

 

THATS THE catagorie.php file !!!

 

2. catalog/admin/includes/general.php

======================================

 

only one add for each tab

 

 

function tep_get_products_name($product_id, $language_id = 0) {

global $languages_id;

 

if ($language_id == 0) $language_id = $languages_id;

$product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");

$product = tep_db_fetch_array($product_query);

 

return $product['products_name'];

}

 

function tep_get_products_specification($product_id, $language_id = 0) {

global $languages_id;

 

if ($language_id == 0) $language_id = $languages_id;

$product_query = tep_db_query("select products_specification from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");

$product = tep_db_fetch_array($product_query);

 

return $product['products_specification'];

}

 

function tep_get_products_extra_info($product_id, $language_id = 0) {

global $languages_id;

 

if ($language_id == 0) $language_id = $languages_id;

$product_query = tep_db_query("select products_extra_info from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'");

$product = tep_db_fetch_array($product_query);

 

return $product['products_extra_info'];

}

 

 

3. catalog/includes/languages/....../catagories.php

===================================================

 

Just add the following

 

define('TEXT_PRODUCTS_SPECIFICATION', 'specification:');

define('TEXT_PRODUCTS_EXTRA_INFO', 'extra_info:');

 

4. ADD TO DATABASE: products_description

=========================================

products_specification

products_extra_info

 

this can be use on de public site in the tabs

 

 

Hope I help somebody else with this..it took me 1 day biggrin.gif:D

 

As I say..it works for me..I wanted the tabs on the publicsite biggrin.gif:D

 

Take a look at NOT READY !!..but take a look

 

i am trying to instal this on v2.3.2 , does anyone have a idea were to put the code for point 2 : admin/includes / general.php as i do not have that file there.

 

 

Thanks in advance,

 

Rob

Share this post


Link to post
Share on other sites

Hi Clint,

 

Thanks very much , i was sort of cunfuseld because i thought this was for 2.3. but then i thought it might be a description for 2.2..., ok , on with the show ;-)

 

Gr, Rob

Share this post


Link to post
Share on other sites

Hi,

 

I have all the codes changed according Dutchman´s post on page 5 of this topic and i get this error message:

 

Parse error: syntax error, unexpected T_ELSE in /home/xxxxxxx/public_html/xxxxxxxxxxxxx/categories.php on line 904

 

De code from the file is this:

 

 <tr>
    <td align="right" class="smallText"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link($back_url, $back_url_params, 'NONSSL')); ?></td>
  </tr>
   </table>
<?php
 } else {
?>
   <table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
	    <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
	    <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
		    <td class="smallText" align="right">
<?php
   echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get');
   echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search');
   echo tep_hide_session_id() . '</form>';
?>

 

Does anyone have a idea were this comes from or what to do ?

 

Thanks very much in advance,

 

Rob

Share this post


Link to post
Share on other sites

Hi all , i changed back to the original file and tried the code from Emikeu a couple posts earlier , now i do not have any alarm bells ringing anymore , and i have the 2 extra input fields in admin , i can see that in the database the extra fields are changing from NULL into a white space and no tekst is stored in the data base.

So it needs a bit more , can somebody give me a direction on were to go now?

 

Thanks,

 

Rob

Share this post


Link to post
Share on other sites

Ok , got it,

 

I did the mod from Emikeu BUT added the mods from Dutchmen next to that , now it works like a charm . only wish is to merge the 3 fields into 1 field with tabs , like you see it in the website........who knows , maybe someone with some knowledge could do this ;-)

 

Gr,

 

Rob

Share this post


Link to post
Share on other sites

Almost forgot : to PRONUX , thanks for a great addon and to Dutchmen and Emikeu , thanks for putting up the code for the admin side here!

Share this post


Link to post
Share on other sites

i have install tms tabs for product info, but i like , make a description in admin, in all products, how can make? thanks

Share this post


Link to post
Share on other sites

It's quite simple:

1. Add the new field to your database, to the table products_description, for example name the new field "new_field".

2. Add the new field to the sql-query on product_info.php, near line 37, for example change

$product_info_query = tep_db_query("select p.products_id, pd.products_name,.........

TO:

$product_info_query = tep_db_query("select p.products_id, pd.new_field, pd.products_name,......

3. Add the new field f.e. to the second tab:

$TMS->tab[2]['content'] = = $product_info['new_field'];

 

Mary Christmas! :thumbsup:

You can specify the code? supposed to do in the admin categories.php? thank you very much

Share this post


Link to post
Share on other sites

I am having an issue with this add-on. Google Webmaster tools states that the website contains over 100 duplicate titles. I look further and it is down to each product being indexed 3 times for the number of tabs so

 

 

.com?_escaped_fragment_=tab2

.com?_escaped_fragment_=tab3

 

 

Where is this getting indexed, I believe this is causing SEO problems, Can you please look and advise.

Share this post


Link to post
Share on other sites

I am having difficulty with the tab title, if I use 2 byte charset. The title will break with Japanese character. Any hint, how to fix it?

The tab content is just working fine, even with Japanese characters!

Share this post


Link to post
Share on other sites

@@vampirehunter

They seem to be fairly different. I have product tabs installed, and it adds nice boxes for the product_info.php

http://mtrosemedia.tk/store/

 

However, I am looking into installing TMS as well since it adds nice navigation menu to the top to allow for custom pages. This doesn't have to necessarily be custom web pages, as much as, a contacts page, Terms and Conditions page, Clearance page, etc.

 

I think they compliment each other. If TMS really is just a navigation menu bar

Share this post


Link to post
Share on other sites

Tab Menu Section (TMS) and Pronux TMS For Admin

 

if i am getting this correctly, if i just do TMS add-on,

 

all the changes will have to be done via coding of the various files in the TMS add on,

 

However

 

if i choose use the Pronux TMS for Admin,

 

i can actually do changes via the admin page of the shop...

 

Am i correct in what i stated? ie. i just have to choose either one of the add-on to get the tabs...

 

or do i have to install both?

 

The weird thing is despite installing both (i don't think they clash) i do not see any additional options at the left column of the admin page, no new modules to install...even the under catalog, categories/products look the same, i can only edit the same way i did previously.

 

My wish what i have to achieve is to add tabs below my product_info box and image - since i have loads of information/description/tables on my products...

after all these, it ends of with "what other customers have bought"

 

Please take a look at my current website www.oxytarm-ap.com using 2.3.1

 

I am also deciding between

 

echo's product tabs (since i successfully added the product info boxes)

http://addons.oscommerce.com/info/8536

 

or this tab TMS plugin

http://addons.oscommerce.com/info/7703

 

I have trouble in installing both add ons.. i just hope to get the final look i want and the easier way to maintain the description, information preferably from the admin page.

 

TIA!

Edited by Comesticage

Share this post


Link to post
Share on other sites

Everyone will give you a different answer as to which is best. The only real way is to instal one and see if it does what you want. If it does great. If not try thre other. You have to make your mind up. Read through the support threads and see what problems there are, and make a choice based on your findings. Failing that use opencart.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

well i want is basically some tabs to put some content in for reviews, additional info and maybe related items

 

for those that have this plugin installed

 

http://addons.oscommerce.com/info/8536

 

is this easy to configure from admin section?

 

the other pronux one, someone said there are two versions, one TMS and one for Admin

http://addons.oscommerce.com/info/7703

 

it would be great to know what the advantages/disadvantages of each are

Share this post


Link to post
Share on other sites

TMS looks nice,

but after installing this addon I saw that it takes over the discription, so now you see it twice on the product page ( no sense ) and for the other tabs you can't insert date in the productpage. I mean you can't have different technical details for each product, because the data comes from the tms page, wich means that every product will have the same text.

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

×