Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

i have error:

Parse error: syntax error, unexpected T_DEFAULT in C:\xampp\htdocs\osc22rc2a\admin\modules.php on line 254

 

line 254 to end:

    default:
     $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');

     if ($mInfo->status == '1') {
       $keys = '';
       reset($mInfo->keys);
       while (list(, $value) = each($mInfo->keys)) {
         $keys .= '<b>' . $value['title'] . '</b><br>';
         if ($value['use_function']) {
           $use_function = $value['use_function'];
           if (ereg('->', $use_function)) {
             $class_method = explode('->', $use_function);
             if (!is_object(${$class_method[0]})) {
               include(DIR_WS_CLASSES . $class_method[0] . '.php');
               ${$class_method[0]} = new $class_method[0]();
             }
             $keys .= tep_call_function($class_method[1], $value['value'], ${$class_method[0]});
           } else {
             $keys .= tep_call_function($use_function, $value['value']);
           }
         } else {
           $keys .= $value['value'];
         }
         $keys .= '<br><br>';
       }
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=remove') . '">' . tep_image_button('button_module_remove.gif', IMAGE_MODULE_REMOVE) . '</a> <a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . (isset($HTTP_GET_VARS['module']) ? '&module=' . $HTTP_GET_VARS['module'] : '') . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');

       if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) {
         $contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' <b>' . TEXT_INFO_VERSION . '</b> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . TEXT_INFO_ONLINE_STATUS . '</a>)');
       }

       $contents[] = array('text' => '<br>' . $mInfo->description);
       $contents[] = array('text' => '<br>' . $keys);
     } else {
       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=install') . '">' . tep_image_button('button_module_install.gif', IMAGE_MODULE_INSTALL) . '</a>');

       if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) {
         $contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' <b>' . TEXT_INFO_VERSION . '</b> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . TEXT_INFO_ONLINE_STATUS . '</a>)');
       }

       $contents[] = array('text' => '<br>' . $mInfo->description);
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Edited by yun
Link to comment
Share on other sites

i have error:

Parse error: syntax error, unexpected T_DEFAULT in C:\xampp\htdocs\osc22rc2a\admin\modules.php on line 254

 

 

Make sure you did not add an extra } at the end of that code segment. It should look like the following:

 

        eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
 // STS V4.6 drop start
       } else {
  if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
   $dir_name = array();
   if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
       while (false !== ($file = readdir($handle))) {
     $pos = strpos($file, ".");
     if($pos === false){
      $dir_name[] = array("id" => $file, "text" => $file);
      $i++;
     }
    }
    closedir($handle);
   }
   $keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
  }else{
   $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
  }
       }
 // STS V4.6 drop end
       $keys .= '<br><br>';
       }
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

From where are the 2 images: infobox_03.gif and infobox_04.gif?

 

Can i delete them? With wath addon they were installed (STS?)

did you get anywhere with this, because im looking to do the same thing but I cant see these files listed anywhere

 

the reason Im asking is that no matter what I do, the same background comes out in the box heading and I believe its related to the $headertext tag. When I use it, the background of the cell is always grey.

 

I want to have it so the background of the cell can be what I select and the title text shows without effecting it the background, if that makes any sense? There must be some colour or image connected to the $headertext and i want to stop it

Edited by RMD27
Link to comment
Share on other sites

did you get anywhere with this, because im looking to do the same thing but I cant see these files listed anywhere

 

the reason Im asking is that no matter what I do, the same background comes out in the box heading and I believe its related to the $headertext tag. When I use it, the background of the cell is always grey.

 

I want to have it so the background of the cell can be what I select and the title text shows without effecting it the background, if that makes any sense? There must be some colour or image connected to the $headertext and i want to stop it

ok, i got it, i changed the stylesheet and its sorted!

Link to comment
Share on other sites

Make sure you did not add an extra } at the end of that code segment. It should look like the following:

 

[b]  // STS V4.6 drop end
       $keys .= '<br><br>';
       }[/b]
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

 

FIX DONE!

 

follow your instruction 2.5 Manual Install, you said:

FIND:

eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
       } else {

 

it should look like that:

          eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
       } else {
         $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
       }

 

you should update 2.5 Manual Install in your instruction.

thanks!

Link to comment
Share on other sites

FIX DONE!

 

follow your instruction 2.5 Manual Install, you said:

FIND:

eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
       } else {

 

it should look like that:

          eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
       } else {
         $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
       }

 

you should update 2.5 Manual Install in your instruction.

thanks!

 

HA. You should read this forum as the same issue was raised just a few posts up. It also states that I will update the manual instructions once I have v4.6.1 ready to be uploaded. By the way, you could have simply compared your admin/modules.php with the admin/modules.php that came with the contribution and all would have been good. thumbsup.gif

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hello.

 

I am a complete newb in STS (and and a newb in osCommerce)

 

I looked around these forums for awhile, but could not find the answer to my problem.

So, here is my problem.

 

I have STS installed, and it works fine (that i know of).

However, when I add an infobox add-on, It doesn't appear when I follow the instructions the developers provide.

So, I looked into the files, and saw the lines that references all the infoboxes in the sts_template.html:

       $categorybox
       $manufacturerbox
       $whatsnewbox
       $cartbox
       $informationbox

like so. I added the name of the new infobox

      $loginbox

However, all that shows up is that text "$loginbox" when I view my site.

So my question is, where do I define "$loginbox?"

Link to comment
Share on other sites

Hello.

 

I am a complete newb in STS (and and a newb in osCommerce)

 

I looked around these forums for awhile, but could not find the answer to my problem.

So, here is my problem.

 

I have STS installed, and it works fine (that i know of).

However, when I add an infobox add-on, It doesn't appear when I follow the instructions the developers provide.

So, I looked into the files, and saw the lines that references all the infoboxes in the sts_template.html:

       $categorybox
       $manufacturerbox
       $whatsnewbox
       $cartbox
       $informationbox

like so. I added the name of the new infobox

  	$loginbox

However, all that shows up is that text "$loginbox" when I view my site.

So my question is, where do I define "$loginbox?"

The reason that just the tag is showing up is because you did not define the new tag in the includes/modules/sts_inc/sts_user_code.php file.

 

See the following step by step:

http://www.oscommerce.com/forums/index.php?showtopic=295660&st=4640&p=1353096entry1353096

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hello!

 

I want to edit how this information is displayed: Image

 

I've read the documentation, but I have a hard time to understand where I should start to do the actual editing. Can I edit the information that is displayed above with STS or do I have to take a look in the core files?

 

If I have to edit the core files, could anyone be so nice and tell me what files I need to touch?

I simply want to change the image size (I might have to change a couple of parameters in admin section?) for the product and just style it a bit. I've been trying to search on Google for quite some time now but I can't find the solution to my problem, which is very frustrating.

 

I hope anyone can be so kind and help me and I really hope that this isn't a question that's been asked 11 million times before.

 

Dear regards, Maxiimilian.

Link to comment
Share on other sites

I've installed osCommerce Online Merchant 2.2 RC2 to my store which is located at www.vdeals.hostoi.com and I would like to change the view/template. Therefore, today I downloaded STS 4.6.1 and in that manual it says, "Note: If you have a fresh install of osCommerce 2.2MS2, you can take the files from the "Files for MS2" folder and copy them over your installation. If you have a fresh install of osCommerce Online Merchant 2.2RC1, you can take the files from the "Files for RC1" folder and copy them over your installation. If you have a fresh install of osCommerce Online Merchant 2.2RC2a, you can take the files from the "Files for RC2" folder and copy them over your installation. If you already have contributions installed, you can make the changes manually". In my scenario, I am supposed to choose "FILES FOR RC2" am I right?

 

If so, I'll have to replace files located on my server at http://www.xxx.com/admin folder and http://www.xxx.com/includes folder isn't it? Please confirm. Thanks.

Link to comment
Share on other sites

I am supposed to choose "FILES FOR RC2" am I right?

Yes thats right

 

If so, I'll have to replace files located on my server at http://www.xxx.com/admin folder and http://www.xxx.com/includes folder isn't it?

You have to copy each file (or folder) to exactly the same location on your server. There is a filestructure in the addon folders that is the same (in the relevant parts) as the structure you have on your server. So it is a 1to1 replacement.

Link to comment
Share on other sites

You have to copy each file (or folder) to exactly the same location on your server. There is a filestructure in the addon folders that is the same (in the relevant parts) as the structure you have on your server. So it is a 1to1 replacement.

 

Yes, I understood. However, I've modified files with greatest difficulties. If I replace those files again (from sts "admin" and "includes" folder to my server "admin" and "includes" folder) whatever the modifications done by me previously will be lost right?

Link to comment
Share on other sites

Yes, I understood. However, I've modified files with greatest difficulties. If I replace those files again (from sts "admin" and "includes" folder to my server "admin" and "includes" folder) whatever the modifications done by me previously will be lost right?

 

Thats obvious not? It's the same like for a text file in word. If you have modified files you need to do changes manually as per instructions, I think it's very clearly described.

 

In no case you can just replace the admin and includes folders (if that is what you mean), you need to replace file by file and add folders wherever they are new.

 

Best is you use a file merging software, there are many free and trial versions on the net, I do use araxis for my self

Link to comment
Share on other sites

how do we make use of the software and what are the functions? how do you make use of it?

What software do you mean? sts? Read the user manual and this forum. If you have a concrete question ask it

Link to comment
Share on other sites

I am referring to ARAXIS

 

I managed to install it and on my ADMIN panel, I've enabled Default template (v2.1.2). However, when I select the template and enable it, the frontend changes. But when you select a product and click on the image, I am getting the following error:

 

 

You are here: Top » Catalog

 

$categorybox$

$manufacturerbox$

$whatsnewbox$

$cartbox$

$informationbox$

 

$specialbox$

$searchbox$

$maninfobox$

$orderhistorybox$

$bestsellersbox$

$reviewsbox$

$tellafriendbox$

$languagebox$

$currenciesbox$

 

Please help me

Link to comment
Share on other sites

I've looked over this extremely long thread but didn't find anything that would help me.. I have installed OsCommerce MNK Premium Edition, which includes STS 4.5.8 and Ultimate SEO installed. It works fine, but I'm trying to change the $content$ in the product list for all categories so that they are not listed one product per line with a "Buy Now" button, but a listing of products in columns like the "What's New" or sub-category.

 

Example of what it is now:

line.jpg

 

How I want it to look:

columns.jpg

 

My questions are:

1. With Ultimate SEO URLs installed, all URLs in the store are now W3 compliant and end with HTML, so how should I name the templates so that STS picks up on the correct template to use?

 

2. My default sts_template.html simply has $content$ in the middle portion. Can I use the placeholders from product_info.php in this section? Will STS pick up on this and use it?

 

3. I'm guessing that I will need to replicate the template per sub-category, right?

 

Any advice/help would be greatly appreciated.

Link to comment
Share on other sites

I've looked over this extremely long thread but didn't find anything that would help me.. I have installed OsCommerce MNK Premium Edition, which includes STS 4.5.8 and Ultimate SEO installed. It works fine, but I'm trying to change the $content$ in the product list for all categories so that they are not listed one product per line with a "Buy Now" button, but a listing of products in columns like the "What's New" or sub-category.

 

Example of what it is now:

line.jpg

 

How I want it to look:

columns.jpg

 

My questions are:

1. With Ultimate SEO URLs installed, all URLs in the store are now W3 compliant and end with HTML, so how should I name the templates so that STS picks up on the correct template to use?

 

2. My default sts_template.html simply has $content$ in the middle portion. Can I use the placeholders from product_info.php in this section? Will STS pick up on this and use it?

 

3. I'm guessing that I will need to replicate the template per sub-category, right?

 

Any advice/help would be greatly appreciated.

 

how did you manage to get this template? it's beautiful. please let me know

Link to comment
Share on other sites

My questions are:

1. With Ultimate SEO URLs installed, all URLs in the store are now W3 compliant and end with HTML, so how should I name the templates so that STS picks up on the correct template to use?

2. My default sts_template.html simply has $content$ in the middle portion. Can I use the placeholders from product_info.php in this section? Will STS pick up on this and use it?

3. I'm guessing that I will need to replicate the template per sub-category, right?

Re1: The naming of the templates doesn't change, doesn't matter if you have SEO url's installed or not. You name the templates as per instructions, no change

Re2: No you can not. Apart it would be senseless since the tags of sts_inc/product_info.php refer to content that is supposed to be displayed on the product info page. But you can create as many tags as you like to use and place them into sts_inc/sts_user_code.php

Re3: You need to make separate templates per category (or subcategory) only in case you want them to be different than the "main" index.php.html template, for example to show other boxes, or to have an other color etc

 

To change the product listing way, the best is you instal the product listing addon.

Edited by multimixer
Link to comment
Share on other sites

how did you manage to get this template? it's beautiful. please let me know

The latest version of sts (v4.6) has many nice templates already installed. You can tweak them easily since it is plain html and css. If you don't like any of them as a base, or don't know how to alter them, the google will give you many results

Link to comment
Share on other sites

Hi everybody,

 

I've spent like 4 desperate days in oscommerce , contributions and STS forums...

So, here is my quetions,

I want to use http://themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 as an oscommerce design.

What I'm trying to find out is how much of this design could be transcribed into Oscommerce via the tags/templates used in STS?

I have read STS docs, and the beginner tutorial so I'm not entirely shooting in the dark.

 

(Please note that I have searched the forums as best as I can but since I don't know if I'm looking for a piece of code to paste into oscommerce pages, or a module, or something else I really don't know what to search for. I'd appreciate a link to appropriate thread/post for my questions instead of just saying "that has been answwered on the forums")

 

1- I have read on this very thread that ul_categories contribution lets you style the categories menu via CSS. Is there a way to do that via STS?

2- When you login to default oscommerce installation there is a product list table (or whatever you name it) . I really don't like that and want to modify it as I please. I want to make it more like the product list http://themeforest.net/item/software-ecommerce-site-full-01/full_screen_preview/19941 or something totally different. Is there a way to do something like that via STS ? If NOT, could you at least direct me to a STS friendly contribution or a tutorial for modifying the "look" of the product lists? (ul_categories for instance works great job styling the categories menu)

3- I am quite good at css/xhtml so I think STS is the right tool for me to come up with unique looking oscommerce sites without worrying too much about os_commerce code. Or am I wrong ?

 

Thank you in advance,

Link to comment
Share on other sites

Re1: The naming of the templates doesn't change, doesn't matter if you have SEO url's installed or not. You name the templates as per instructions, no change

Re2: No you can not. Apart it would be senseless since the tags of sts_inc/product_info.php refer to content that is supposed to be displayed on the product info page. But you can create as many tags as you like to use and place them into sts_inc/sts_user_code.php

Re3: You need to make separate templates per category (or subcategory) only in case you want them to be different than the "main" index.php.html template, for example to show other boxes, or to have an other color etc

 

To change the product listing way, the best is you instal the product listing addon.

 

Thanks for the quick answer. Guess STS doesn't support this directly, so I'll have to do it the hard way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...