Jump to content
Latest News: (loading..)
rigadin2

[Contribution] STS v4

Recommended Posts

Well, the search function in this forum isn't working for me, either I find no results where I'm certain there should be results, or I get too many results that all point to the initial page of a few topics.
:lol:

I never use the search functions provided here. I use Google and it works great.

 

To search this thread use the following search string in Google:

 

 

site:forums.osCommerce.com [Contribution] sts v4 product listing

The would search this thread for "product listing"

 

To search the entire forum, use this:

 

site:forums.oscommerce.com product listing

 

To search just the contributions, use this:

 

site:http://www.oscommerce.com/community/contributions product listing

Hope this helped,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Tony, your issues are most likely associated with a bad integration of the two. Go over my step by step to be sure you have all your bases coverered (see link in my signature below).

Hi Bill!

I have done it right but when i paste the ;headertags.php in the STS so will the homepage become a white blank page.

 

Any idea where i can start looking for problem??

 

/Tony

Share this post


Link to post
Share on other sites
Hi Bill!

I have done it right but when i paste the ;headertags.php in the STS so will the homepage become a white blank page.

 

Any idea where i can start looking for problem??

 

/Tony

Tony,

 

Did you install the catalog modifications like the HTC instructions read? If so, then that could be the problem.

 

Also, usually a blank page happens becuase the file in the root directory was replaced with the one that goes in the english directory. Double check that.

 

One other thing, be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Tony,

 

Did you install the catalog modifications like the HTC instructions read? If so, then that could be the problem.

 

Also, usually a blank page happens becuase the file in the root directory was replaced with the one that goes in the english directory. Double check that.

 

One other thing, be sure you have the following line of code at the beginning of your includes/header_tags.php file:

 

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

Hi Bill!

I made it work now i updated the STS to your new one so it was problem with the old one.

Thank you for your time.

 

Regards Tony

Share this post


Link to post
Share on other sites
Try turning off your STS Product Info module so that you are not using STS Product_info content templates.

 

If you want to use the content template feature for you product_info.php file, then you'll need to make some changes in includes/modules/sts_inc/product_info.php.

:thumbsup: In general, the changes that a contribution makes in catalog/product_info.php must also be done in this file when using content templates.

 

THANKS BILL!!!!!!

 

I thought I would need to start all over again with my layout! :(

I will try what you considered and will post my result later today!

 

See you later! ;)


IT?s ALL good!!!

Share this post


Link to post
Share on other sites

Hello all!

 

I got redirected to this thread for support on my site.

I see that there's over 166 pages worth of information and I don't have the ability to filter and look through the entire thread (Well, I did for like the first 12 pages already though) for my answers.

 

however, here's the problem..

Popup isn't working after STS is installed.

Meaning if i turn it off, it still works.

 

I believe its got to do with javascript, since the bottom left (status panel) of the browser has:

java script:popupWindow(linktopicture)....

 

MY STORE: http://www.moods.com.sg/catalog/product_in...?products_id=30

just try hitting click to enlarge and look at your status bar.

 

Curious, where might that 'javescript:popupwindow(http://....)' be?

Is <?php echo HTML_PARAMS; ?> affecting the file too?

 

I have also looked up other threads and the error may lie in the various files:

catalog/popup_image.php

 

<?php
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>
<head><!--$headcontent-->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

</head>

 

 

catalog/product_info.php

<?php
/*
$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.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)$HTTP_GET_VARS['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);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>
<head><!--$headcontent-->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>

</head>

 

Finally, my STS template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<meta http-equiv="Content-Language" content="en-us">
<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
body {
background-color: #BFA884;
background-image: url(http://img.photobucket.com/albums/v226/babyswirl/bckgrd-4.gif);
background-repeat: repeat;
}
.style1 {
font-size: 12;
font-weight: bold;
}
-->
</style></head>

 

Would any great expert be able to advise? It'll be really my pleasure to hear just anyone out.

 

Secondly.. why can't the store be viewed on MACs?

Some people also mentioned that certain browsers cannot display the webpage.

Do help.. thanks a million people!

Share this post


Link to post
Share on other sites
Hello all!

 

I got redirected to this thread for support on my site.

I see that there's over 166 pages worth of information and I don't have the ability to filter and look through the entire thread (Well, I did for like the first 12 pages already though) for my answers.

 

however, here's the problem..

Popup isn't working after STS is installed.

Meaning if i turn it off, it still works.

 

I believe its got to do with javascript, since the bottom left (status panel) of the browser has:

java script:popupWindow(linktopicture)....

 

MY STORE: http://www.moods.com.sg/catalog/product_in...?products_id=30

just try hitting click to enlarge and look at your status bar.

 

...Would any great expert be able to advise? It'll be really my pleasure to hear just anyone out.

 

Secondly.. why can't the store be viewed on MACs?

Some people also mentioned that certain browsers cannot display the webpage.

Do help.. thanks a million people!

 

OK...

I detect that you are having multible issues banging together to cause this problem.

 

First off, check your STS installation file by file. I think you may have missed some edits causing $sts->template['applicationtop2header'] not to function. Use a file comparison tool such as Beyond Compare or WinMerge. It may just be code that is out of place.

 

Second, I believe you misconfigured your STS Modules in the admin. To test this out, put everything back to the default settings. You may have to simply disable and then re-enable each STS module to do this. Once you have set each module back to its default setting, ONLY ENABLE the DEFAULT MODULE for testing.

 

Set the Default module as so:

Use Templates?

true

 

Code for debug output

debug

 

Files for normal template

sts_user_code.php

 

Base folder

includes/sts_templates/

 

Template folder

test

 

Default template file

sts_template.html

 

Use template for infoboxes

false

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

One thing I noticed when running a test on your site is that you have your shop configured to run in STS3 compatibility mode. Is there a reason you need to do that?

 

OK, now test your site for the popup images. If it still does not work, then the problem does not lie with how you configured STS (still check your installation) but most likely lies with some bad code in your stock osC files.

 

Have you made any edits in the product_info.php or popup_image.php files? Again, do a comparison with a stock osC version of these files.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hello all!

 

Secondly.. why can't the store be viewed on MACs?

Some people also mentioned that certain browsers cannot display the webpage.

Do help.. thanks a million people!

 

STS template looks good in IE but not in Firefox or other browsers

 

This is a web standard issue not a STS issue. It has to do with how you coded your template. The doctype specified in the template is for standard HTML. You will need to specify your own doctype according to the the web standards. You can learn more about doctypes and why they are important at the following web site:

 

http://alistapart.com/stories/doctype/

 

http://www.htmlhelp.com/tools/validator/doctype.html

 

http://www.w3.org/QA/Tips/Doctype

 

FAST FIX:

Find this line in your template:

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

Change it to something like this:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">

 

Hope this helps,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hi i am new to oscommerce and sts, i have been following the install instructions and installed oscommerce successfully but i cant get sts to install, i am using sts v4.5.8 and i have followed the instrauction provided. I copied over the files like the installation instructed and i also replaced the files the directories stated with the files in RC1, but when i go to install the module in admin the default index etc options are not present, its empty. Can anyone help me with this, where could i have gone wrong? any help will be appreaciated greatly,

 

thanks

Share this post


Link to post
Share on other sites

Hi there Bill (or anyone who can help me:),

 

Firstly, thanks so much for this contribution, it truly makes oscommerce so much better!

 

I have a few questions:

 

1) How can I get the number of items in the shopping cart - in the form of a text placeholder?

so instead of having the cartbox, I can just have something like this: number-of-items.jpg

 

2) How can I customize the product listing pages, eg when I click on a category?

To something beautiful like this: product-listing.jpg

Same goes for the shopping cart pages? : cart.jpg

Are there placeholders to use for these pages or another way of tweaking them?

 

3) One last one :)

If I'd like to put the specials on the home page, in a nice custom 2X2 like the picture above, how would I do this?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hi everyone!

 

Is there an easy way to edit some php file to make the product look like this: "Buy product 1" instead of just "product 1"? Furthermore: When clicked, I'd like the product to be added to the shopping cart. Perhaps tep_href_link somewhere??

 

A second option could be to have the "product 1" NOT clickable.... Only the Buy button... Any hints?

Thanks! :thumbsup:

 

clickableav7.jpg

Share this post


Link to post
Share on other sites
Hi i am new to oscommerce and sts, i have been following the install instructions and installed oscommerce successfully but i cant get sts to install, i am using sts v4.5.8 and i have followed the instrauction provided. I copied over the files like the installation instructed and i also replaced the files the directories stated with the files in RC1, but when i go to install the module in admin the default index etc options are not present, its empty. Can anyone help me with this, where could i have gone wrong? any help will be appreaciated greatly,

 

thanks

hits,

You missed some important pieces of the installation namely the admin files. You need to install the files in the "STS" folder as well as the files in the "RC1" folder. Each file included in each of these folders need to strictly follow the same folder structure of osCommerce. The contribution already has these files placed into the proper osCommerce folder.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hi there Bill (or anyone who can help me:),

 

Firstly, thanks so much for this contribution, it truly makes oscommerce so much better!

 

I have a few questions:

 

1) How can I get the number of items in the shopping cart - in the form of a text placeholder?

so instead of having the cartbox, I can just have something like this: number-of-items.jpg

 

2) How can I customize the product listing pages, eg when I click on a category?

To something beautiful like this: product-listing.jpg

Same goes for the shopping cart pages? : cart.jpg

Are there placeholders to use for these pages or another way of tweaking them?

 

3) One last one :)

If I'd like to put the specials on the home page, in a nice custom 2X2 like the picture above, how would I do this?

 

Thanks in advance

 

Hello Ryan,

 

Checkout the available placeholders (tags) in the STS User Manual. What you are wanting is not available "out of the box" but I will make it available for you here...

 

Hopefully you feel comfortable enough to add some PHP code into an existing file. Follow these easy steps to do so:

  1. Download a copy of your includes/modules/sts_inc/sts_user_code.php file
  2. Open this file in Notepad or anyother simple text editor
  3. Find the following line of code:
    /* // START COMPATIBILITY WITH STS 2 AND 3: $footer


  4. We are going to create a new STS tag for your purpose...
    Add this code directly above the code listed in Step 3:
    $sts->start_capture();
    $productno = $cart->count_contents();
    $totalprice = $currencies->format($cart->show_total());
    if ($productno > 1) {
    echo ENTRY_HCART_CONTAINS;
    echo " ";
    echo $productno;
    echo " ";
    echo ENTRY_HCART_ITEMS;
    echo " "; echo " ";
    echo ENTRY_HCART_PRICE;
    echo " ";
    echo $totalprice;
    } elseif ($productno == 0) {
    echo ENTRY_HCART_EMPTY;
    } else {
    echo ENTRY_HCART_CONTAINS;
    echo " ";
    echo $productno;
    echo " ";
    echo ENTRY_HCART_ITEM;
    echo " "; echo " ";
    echo ENTRY_HCART_PRICE;
    echo " ";
    echo $totalprice;
    }
    $sts->stop_capture ('headcart');


  5. The above will create a tag called $headcart, essentially the $cartbox tag with some restrictions and without the box.
  6. Save the sts_user_code.php file as the same file name and then upload it back into your includes/modules/sts_inc/ folder.
  7. Add the $headcart tag where you want this to appear in your template.

As for the second question,

Create an infobox template for the specials box and make it the size you want. Create a home page template called index.php_0.html and place your specials box in it.

 

Enjoy,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hi everyone!

 

Is there an easy way to edit some php file to make the product look like this: "Buy product 1" instead of just "product 1"? Furthermore: When clicked, I'd like the product to be added to the shopping cart. Perhaps tep_href_link somewhere??

 

A second option could be to have the "product 1" NOT clickable.... Only the Buy button... Any hints?

Thanks! :thumbsup:

 

clickableav7.jpg

John,

If I understand you correctly, the edits you would need to make would be in the file located in includes/modules/product_listing.php.

 

Look for a line as so:

			  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

To add the "Buy" in you would change it as so:

			  $lc_text = 'Buy  <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

Remove the link reference in each of those line(s) to remove the hyperlink.

 

Hope this helped,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hello Ryan,

 

Checkout the available placeholders (tags) in the STS User Manual. What you are wanting is not available "out of the box" but I will make it available for you here...

 

Hopefully you feel comfortable enough to add some PHP code into an existing file. Follow these easy steps to do so:

  1. Download a copy of your includes/modules/sts_inc/sts_user_code.php file
  2. Open this file in Notepad or anyother simple text editor
  3. Find the following line of code:
    /* // START COMPATIBILITY WITH STS 2 AND 3: $footer


  4. We are going to create a new STS tag for your purpose...
    Add this code directly above the code listed in Step 3:
    $sts->start_capture();
    $productno = $cart->count_contents();
    $totalprice = $currencies->format($cart->show_total());
    if ($productno > 1) {
    echo ENTRY_HCART_CONTAINS;
    echo " ";
    echo $productno;
    echo " ";
    echo ENTRY_HCART_ITEMS;
    echo " "; echo " ";
    echo ENTRY_HCART_PRICE;
    echo " ";
    echo $totalprice;
    } elseif ($productno == 0) {
    echo ENTRY_HCART_EMPTY;
    } else {
    echo ENTRY_HCART_CONTAINS;
    echo " ";
    echo $productno;
    echo " ";
    echo ENTRY_HCART_ITEM;
    echo " "; echo " ";
    echo ENTRY_HCART_PRICE;
    echo " ";
    echo $totalprice;
    }
    $sts->stop_capture ('headcart');


  5. The above will create a tag called $headcart, essentially the $cartbox tag with some restrictions and without the box.
  6. Save the sts_user_code.php file as the same file name and then upload it back into your includes/modules/sts_inc/ folder.
  7. Add the $headcart tag where you want this to appear in your template.

As for the second question,

Create an infobox template for the specials box and make it the size you want. Create a home page template called index.php_0.html and place your specials box in it.

 

Enjoy,

Sorry....I forgot to list the new language defines for that code to work.

Place the following code just before the last ?> (second to last line) of the includes/languages/engish.php file:

 

// STS Show Cart In Header
define('ENTRY_HCART_EMPTY', 'Your cart is empty');
define('ENTRY_HCART_CONTAINS', 'You have ');
define('ENTRY_HCART_ITEM', '<a href="shopping_cart.php" class="trailText">item in your cart</a>');
define('ENTRY_HCART_ITEMS', '<a href="shopping_cart.php" class="trailText">items in your cart</a>');
define('ENTRY_HCART_PRICE', '');

 

Sorry about that. :blush:

 

Now that new $headcart tag will act like it should. :thumbsup:


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hi,

 

May be this issue raised here before. I just installed Protx Direct system. WHen on checkout_payment.php page I clicked link which open new popupwindow i.e https://www.mysite.com/cvs_help.php, this open my STS tags template page. and showing all tags on this pages.

When I temporarly Turn off STS , click open new popup with exact information suppose to show.

 

I hope someone will help me and direct me in right file and code to fix as I am still php learner.

 

 

Regards

Zee

Share this post


Link to post
Share on other sites
STS template looks good in IE but not in Firefox or other browsers

 

This is a web standard issue not a STS issue. It has to do with how you coded your template. The doctype specified in the template is for standard HTML. You will need to specify your own doctype according to the the web standards. You can learn more about doctypes and why they are important at the following web site:

 

http://alistapart.com/stories/doctype/

 

http://www.htmlhelp.com/tools/validator/doctype.html

 

http://www.w3.org/QA/Tips/Doctype

 

FAST FIX:

Find this line in your template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

Change it to something like this:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">

 

Hope this helps,

 

thanks for your help bil..

 

I went to look up the documentation for stock OSC..

 

i found out that there were 2 scripts for the java popup and the error was here:

 

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%',
'10'); ?></td> </tr> <tr> <td class="main">
<?php if (tep_not_null($product_info['products_image'])) {
?> <table border="0" cellspacing="0" cellpadding="2"
align="right"> <tr> <td align="center"
class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES .
$product_info['products_image']) . '" target="_blank">' .
tep_image(DIR_WS_IMAGES . $product_info['products_image'],
$product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,
'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE .
'</a>'; ?>
</noscript> </td> </tr> </table>

 

Now the popup works!!! :)

But.. not the right size though.. !

but good enough for the moment...

hope someone can fix it up a lil!

Share this post


Link to post
Share on other sites
thanks for your help bil..

 

I went to look up the documentation for stock OSC..

 

i found out that there were 2 scripts for the java popup and the error was here:

 

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%',
'10'); ?></td> </tr> <tr> <td class="main">
<?php if (tep_not_null($product_info['products_image'])) {
?> <table border="0" cellspacing="0" cellpadding="2"
align="right"> <tr> <td align="center"
class="smallText">
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES .
$product_info['products_image']) . '" target="_blank">' .
tep_image(DIR_WS_IMAGES . $product_info['products_image'],
$product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,
'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE .
'</a>'; ?>
</noscript> </td> </tr> </table>

 

Now the popup works!!! :)

But.. not the right size though.. !

but good enough for the moment...

hope someone can fix it up a lil!

Now that you have that fixed, feel free to enable the Popup Image module to take advantage of the popup_image.php.html template.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Hi,

 

May be this issue raised here before. I just installed Protx Direct system. WHen on checkout_payment.php page I clicked link which open new popupwindow i.e https://www.mysite.com/cvs_help.php, this open my STS tags template page. and showing all tags on this pages.

When I temporarly Turn off STS , click open new popup with exact information suppose to show.

 

I hope someone will help me and direct me in right file and code to fix as I am still php learner.

 

 

Regards

Zee

Zee,

What version of osCommerce are you using and what version of STS? You need to have at least osC version 51113 MS2.2 and hopefully the latest version of STS (4.5.8).


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Zee,

What version of osCommerce are you using and what version of STS? You need to have at least osC version 51113 MS2.2 and hopefully the latest version of STS (4.5.8).

 

 

Thanks bill,

 

I am using Osc version 060817 ms2.2 and latest version available fro STS 4.5.8. do I need to upgrade anything or you advise me fix of this please.

 

Regards

 

Zee

Share this post


Link to post
Share on other sites
Sorry....I forgot to list the new language defines for that code to work.

Place the following code just before the last ?> (second to last line) of the includes/languages/engish.php file:

 

// STS Show Cart In Header
define('ENTRY_HCART_EMPTY', 'Your cart is empty');
define('ENTRY_HCART_CONTAINS', 'You have ');
define('ENTRY_HCART_ITEM', '<a href="shopping_cart.php" class="trailText">item in your cart</a>');
define('ENTRY_HCART_ITEMS', '<a href="shopping_cart.php" class="trailText">items in your cart</a>');
define('ENTRY_HCART_PRICE', '');

 

Sorry about that. :blush:

 

Now that new $headcart tag will act like it should. :thumbsup:

 

Thanks so so much, the shopping cart works brilliantly!

I really appreciate your help.

Hope you don't mind if I ask a few more?

 

1) The currencies box(using the placeholder from sts) has a white box around it, or so it seems and it is pushing my table and making it bigger than I want. Is there any way of changing this so it is just the (narrower) currency box?

currencybox.jpg

 

2) I would like to customize the product listing page,(ie. when you click on a category)

from the default to a nice 2x2 like this:

product-listing2.jpg

is this possible with STS? or another way?

I would also like to apply this to the specials page?

 

I know its alot of questions - I have an ever enquiring mind

 

Thanks again

Ryan

Share this post


Link to post
Share on other sites
John,

If I understand you correctly, the edits you would need to make would be in the file located in includes/modules/product_listing.php.

 

Look for a line as so:

			  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

To add the "Buy" in you would change it as so:

			  $lc_text = 'Buy  <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

Remove the link reference in each of those line(s) to remove the hyperlink.

 

Hope this helped,

 

Thanks a lot Bill! That did the trick with the "Buy product" and removal of link. Perfect!! :thumbsup: :thumbsup:

 

For anyone else in need of what I want... My code looks like this now with "buy" added and the link reference removed:

$lc_text = 'Buy <' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '>' . $listing['products_name'] . ' ';

 

I do wonder though if it´s possible to make the "Buy product text" to act like a buy button when it´s clicked. I want the product to be added to the cart.

 

I have been trying to add various parts of this code (from the buy button part) but with no luck so far.

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' .

 

I will keep on with trial and error here and let you guys know if I have any success. (My php skills are unfortunately hardly worth mentioning). :blush:

Share this post


Link to post
Share on other sites
Does STSv4.5.8 working with OSC RC2 ?

 

I tried an install but my catalog went to a blank page... :huh:

 

Jano

Jano,

What method did you perform to do the installation, manual or just copy files?


Bill Kellum

 

Sounds Good Productions

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

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

×