Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

I've just installed and have a litte problem. (on a clean install)

 

I've set "Use template for index page = true"

But I have to edit both index.php.html and sts_template.html for my index page to change.

 

What is going wrong here?

Link to comment
Share on other sites

Janet,

No, that should not look like that.

You should be getting this:

 

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

Are you adding in some extra JavaScript to the page? Also, does it really say "mydomain.com" or did you add that to the post?

 

Hi Bill, thanks for your response... I'll review to see where that piece of code came from... it could be related to Ultrapics and/or the Lightbox module for Ultrapics... any way I removed that snippet, but it didn't get my little padlock to show, so I'm still looking.

 

I didn't post the domain quite yet, just being careful since the site isn't yet ready for primetime, but I could email you the url if you think you might have some advice on getting the padlock... I've lost two days on it so far!

 

Thanks,

Janet

Link to comment
Share on other sites

I've just installed and have a litte problem. (on a clean install)

 

I've set "Use template for index page = true"

But I have to edit both index.php.html and sts_template.html for my index page to change.

 

What is going wrong here?

You have to set a default template to be used for the pages in which you do not make a specific template for (out of the box it is sts_template.html). Be sure you have set your template folder and you placed your default and index.php.html templates in that folder.

 

If you are wanting a template for the "home" page, then you would create a template called "index.php_0.html". The "index.php.html" template will be used for all category pages unless you specify a category such as "index.php_1.html" (for category 1) and so on.

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 everybody,

 

Thanks for a great contribution, and i'm slowly getting the hang of things with the help of these forums.

However i've been stuck for about a day now on the following (looking at too many pages and too many code)

 

If you select a category, all the products in that category show on a product listing page.

On top of that page is a drop down box which let's you choose to see any products from a certain manufacturer.

 

I am not going to use manufacturers, so i would like that drop box to show the sub categories in within the main category.

 

My questions:

 

- Where is that drop box is called?

- How do i change the manufacturer list to subcategories within the category?

 

Thanx in advance!

Soob

Link to comment
Share on other sites

Hi again.

 

I still haven´t been able to implement an "add-link-to-cart"... Meaning that when customers click the product listed I want it to be added to the cart immediately without having to click on the Add to cart button. I have tried everything I can come up with but: No success. :angry:

 

Therefore am I putting my last hope to you Bill (or perhaps someone else as well). :rolleyes: :rolleyes:

 

Well I tried and I tried.. And finally I got some result! :thumbsup: :thumbsup: I don't know if it is of interest to anyone but maybe so here is the code I came up with:

Line 100-101 in product_listing.php now looks like this:

 

  $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']) . '">Buy ' . $listing['products_name'] . '</a> ';
		}

 

This code makes the product listed become a clickable link with "Buy" in front of it. Once clicked the product is added to the shopping cart.

 

Maybe someone else than me finds it usable. :)

Link to comment
Share on other sites

Is there a way to create a manufacturers drop down menu like the $catmenu tag? If so, could someone help a php novice with a little coding help. I thought of copying the $catmenu code and replacing every instance of 'categories' with 'manufacturers' but I'm pretty sure that won't work.

Link to comment
Share on other sites

Is there a way to create a manufacturers drop down menu like the $catmenu tag? If so, could someone help a php novice with a little coding help. I thought of copying the $catmenu code and replacing every instance of 'categories' with 'manufacturers' but I'm pretty sure that won't work.

 

Yes there is.. I'm not using manufacturers neither am I good at php. But I can give you some code for a product drop down. Bill helped me with this earlier.

 

This is a link to a category <a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

Here is a code example of a drop down list you could try:

 

<select name="menu1" onChange="self.location.href=this.options[this.selectedIndex].value;" sstyle="color:#000000; font-family:Arial; font-weight:bold; font-size:12px; background-color:#cccccc; border:1px #C2D3FC solid; border-color:#9999999; width:150px;">
	  <option value="http://yoursite.com/manufacturers.php" selected>Manufacturer A-Z
		<option value="<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>Manufacturer Name Here</a>
	   </select>

 

You need to find your manufacturer ID and replace that with 'cpath=21&'.

 

:-"

Link to comment
Share on other sites

Yes there is.. I'm not using manufacturers neither am I good at php. But I can give you some code for a product drop down. Bill helped me with this earlier.

 

This is a link to a category <a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

Here is a code example of a drop down list you could try:

 

<select name="menu1" onChange="self.location.href=this.options[this.selectedIndex].value;" sstyle="color:#000000; font-family:Arial; font-weight:bold; font-size:12px; background-color:#cccccc; border:1px #C2D3FC solid; border-color:#9999999; width:150px;">
	  <option value="http://yoursite.com/manufacturers.php" selected>Manufacturer A-Z
		<option value="<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>Manufacturer Name Here</a>
	   </select>

 

You need to find your manufacturer ID and replace that with 'cpath=21&'.

 

:-"

 

Thanks for the tip on the product dropdown, but I'm looking for a dynamic manufacturer dropdown that generates the list all on its own, just like the $catmenu.

Link to comment
Share on other sites

Thanks for the tip on the product dropdown, but I'm looking for a dynamic manufacturer dropdown that generates the list all on its own, just like the $catmenu.
STS already comes with a manufacturers drop down in the $manufacturerbox tag. To get this out of a box, just create an infobox template for it.

 

For example:

 

infobox_manufacturers_header.php.html:

 

<!--leave blank to remove the manufacturers header-->

 

infobox_manufacturers.php.html:

 

<p>$content</p>

 

If you need to, remove all the CSS from the manufacturers box so that it will look just like the $catmenu.

 

Hope this helped,

Edited by bkellum

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

STS already comes with a manufacturers drop down in the $manufacturerbox tag. To get this out of a box, just create an infobox template for it.

 

For example:

 

infobox_manufacturers_header.php.html:

 

<!--leave blank to remove the manufacturers header-->

 

infobox_manufacturers.php.html:

 

<p>$content</p>

 

If you need to, remove all the CSS from the manufacturers box so that it will look just like the $catmenu.

 

Hope this helped,

I should have been more detailed regarding the CSS of the box so here is a link to discuss how to add a new box class to any/all infoboxes:

http://www.oscommerce.info/kb/osCommerce/C..._Area/Boxes/248

 

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

Link to comment
Share on other sites

I have a question that I have tried to resolve on my own, but am at a loss as to how to find it and change this behavior

 

I have product info templates turned on, working from the FULL templates directory.

 

If you look at this page; http://creativenestings.com/osc22rc1/catal...ex.php?cPath=22

You will see drawn a nice table layout for the product.

 

When you select a particular product it then loads the product_info.php.html template.

I use this template for all product info's.

 

Here is the link to a product info page http://creativenestings.com/osc22rc1/catal...;products_id=81

 

As you can see it draws the table for the product info "INSIDE" the previous category table.

 

I don't want that top table showing up, especially now that I have the buttons to select how many products

get displayed on the category pages.

 

 

How do I get the top table to not be included in the Product info page.

 

Trust me, I did not draw it in the product_info.php.html file.

 

Heeeeeeeelp :)

 

Nac

Link to comment
Share on other sites

I should have been more detailed regarding the CSS of the box so here is a link to discuss how to add a new box class to any/all infoboxes:

http://www.oscommerce.info/kb/osCommerce/C..._Area/Boxes/248

 

Hope this helped,

 

 

Thanks, this did help! Now I just have to style it and set it up the way I want it.

 

However, I have another question. It may not be STS related, but you seem like a knowledgeable guy and you might know the answer.

 

Is there anyway to link the categories and manufacturers pulldown menus so they work together like a filter? Say someone pulls down the "Software" category in a default osC install, it shows all of the products under "Software." After that, the manufacturers' dropdown is pulled to "Sierra" and it shows just the Sierra products under the "Software" category. Ideally, my setup looks like this.

 

search box | category drop down menu | manufacturer drop down menu

 

I've used the Search Box Anywhere contribution to improve the default search and move it out of an infobox. I've got $catmenu for the drop down and the $manufacturerbox (unboxed like your reply) as the next drop down.

 

So, if a customer wants to quickly browse through categories or manufacturers, the dropdown takes care of that. But if they try to refine their category browsing and limit it by manufacturer, the category resets to all categories. I want it to stay on the selected category to allow further refinement by the manufacturer box.

 

 

Sorry for the long question! I hope it has a simple answer!

Link to comment
Share on other sites

I installed OS commerce (by FTPing), then ran the setup. After that, I uploaded the STS files (for RC2 folder). Now I am getting error messages. I did have the store working correctly for a little bit before I installed STS.

 

 

Warning: require(includes/classes/sts.php) [function.require]: failed to open stream: No such file or directory in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

Warning: require(includes/classes/sts.php) [function.require]: failed to open stream: No such file or directory in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/sts.php' (include_path='.;c:\php5') in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

I tried to post here:

http://www.oscommerce.com/forums/index.php?showforum=7

 

File:

/catalog/index.php

 

Previous Error Message:

Fatal error: Call to a member function add_current_page() on a non-object in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 312

 

OS Commerce Version:

oscommerce-2.2rc2

Link to comment
Share on other sites

I installed OS commerce (by FTPing), then ran the setup. After that, I uploaded the STS files (for RC2 folder). Now I am getting error messages. I did have the store working correctly for a little bit before I installed STS.

 

 

Warning: require(includes/classes/sts.php) [function.require]: failed to open stream: No such file or directory in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

Warning: require(includes/classes/sts.php) [function.require]: failed to open stream: No such file or directory in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

Fatal error: require() [function.require]: Failed opening required 'includes/classes/sts.php' (include_path='.;c:\php5') in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 501

 

I tried to post here:

http://www.oscommerce.com/forums/index.php?showforum=7

 

File:

/catalog/index.php

 

Previous Error Message:

Fatal error: Call to a member function add_current_page() on a non-object in D:\Inetpub\wallflowerkids\catalog\includes\application_top.php on line 312

 

OS Commerce Version:

oscommerce-2.2rc2

 

Jeff,

 

Are you sure that you uploaded the files in the STS folder as well as the files in the RC2 folder?

 

If so, then did you first try the default STS settings in the STS Modules (in your store's Admin) before making any changes just to be sure that you installed it correctly?

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

I have a question that I have tried to resolve on my own, but am at a loss as to how to find it and change this behavior

 

I have product info templates turned on, working from the FULL templates directory.

 

If you look at this page; http://creativenestings.com/osc22rc1/catal...ex.php?cPath=22

You will see drawn a nice table layout for the product.

 

When you select a particular product it then loads the product_info.php.html template.

I use this template for all product info's.

 

Here is the link to a product info page http://creativenestings.com/osc22rc1/catal...;products_id=81

 

As you can see it draws the table for the product info "INSIDE" the previous category table.

 

I don't want that top table showing up, especially now that I have the buttons to select how many products

get displayed on the category pages.

 

 

How do I get the top table to not be included in the Product info page.

 

Trust me, I did not draw it in the product_info.php.html file.

 

Heeeeeeeelp :)

 

Nac

 

I went to your site and it looks like you figured it out.

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

I went to your site and it looks like you figured it out.

 

I did get the buttons working :) for product selection numbers, but the when you do a product info, it still draws the previous

category table then the product info tabel too. :(

 

Still looking for a solution

 

Nacman

Link to comment
Share on other sites

Hi Folks!

I have a big problem i have built a site on my computer at home and then i ftp up it to the server and took backup and reloaded the sql file in the database but when i look at the site the sts is not working but with the same files and installations it works on my computer, does anyone now what the problem can be???

 

Regards Tony

 

Edit: never mind i missed a link so now it works

Edited by El_Heso
Link to comment
Share on other sites

Well here I am again asking for help from the oscommerce experts,

 

I have using STS with oscommerce with a lot of contributions and everything is working fine.

 

Now at my index page i'm using the $banner_only to display the banners with URL to my products.

 

But I want to display the banners only at Index page and it is showing at all pages Categories, Product Info etc..

 

I think a small IF will do but I'm not an oscommerce PHP expert.

 

Is there any contribution or any PHP code to do this?

 

Regards

Link to comment
Share on other sites

Well here I am again asking for help from the oscommerce experts,

 

I have using STS with oscommerce with a lot of contributions and everything is working fine.

 

Now at my index page i'm using the $banner_only to display the banners with URL to my products.

 

But I want to display the banners only at Index page and it is showing at all pages Categories, Product Info etc..

 

I think a small IF will do but I'm not an oscommerce PHP expert.

 

Is there any contribution or any PHP code to do this?

 

Regards

Don't need an IF statement at all...just create a home page template called index.php_0.html and place the banner tag in that template only. Remove the banner tag from the other templates.

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

No, but I did figure it out, that helped a lot when I included the STS folder :)

 

Now, I am stuck on another problem. I read through the manual for STS, but I am not sure what the steps would be to add a new templated page? I got index to be templated ok, but when I tried the same thing with products, it did not work. How do I make a templated page from scratch?

http://67.199.43.230/catalog/products.php

 

Do I need to do something in the modules page?

modules.php?set=sts&module=sts_index

 

Do I need to add a page to the Catalog folder?

 

Do I need to add a page to sts_templates?

 

Is this the page in the manual? Because I can not figure it out: 3.6 Create a template for a specific page

 

Is there anything else I need to do?

 

Thanks so much. Sorry, I do not know why I am confused.

 

I went to your site and it looks like you figured it out.
Link to comment
Share on other sites

Tom,

 

This one is way too easy....are you ready....here ya go...

 

Use the $catmenu tag. :lol: (I'm not making fun...just thought you would be excited that the solution is already available "out of the box".

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

 

$catmenu = Drop-down list of existing categories. Redirect to the selected category.

 

:- It takes time to generate this placeholder as it is scrolling through all the categories. It is recommended to remove its code if you don't use it.

 

The tag itself is created in: includes/modules/sts_inc/sts_user_code.php

 

Possible use: place in header for fast navigation through categories.

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

Have fun,

 

Am I the only one who's OsCID gets blown away by the $catmenu? I'm trying it on just a stock install and each time I select something from the $catmenu drop down, the OsCID gets lost. The $manufacturerbox dropdown works fine. Just wondering if there's a problem on my side or if it's a universal thing. Thanks in advance...

Link to comment
Share on other sites

I have to say, the sts_user_code.php facility is quite fantastic! All those little PHP functions that I've written, I can just add them in there and call them anytime I like. During my first effort, I just copied my code, wrapped it in the hermetically sealed and approved STS format, gave it a name and wham - success! As I was doing it, I thought, "No way is this going to work on the first shot" but it did. Absolutely top notch. :thumbsup:

Link to comment
Share on other sites

Hi there,

 

I just did a clean install of OSC 2.2RC2, FEC 3.2 v5, and STS4.5.8 in that order. Everything seems to be working fine except the prettier parts of the check out pages of FEC.

 

I did find a similar post from 2 years ago, but with no resolution:

http://www.oscommerce.com/forums/index.php?s=&...st&p=906390

 

The problem I'm having is that FEC calls a toggle_collapse javascript function. However the "collapse" aspect doesn't work. The form that's supposed to be collapsed is already expanded. Is STS stripping javascripts from the page?

 

Thanks!

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