Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Ok. Have a small issue now.

 

I am trying to link to specific category pages from graphic links and not the normal menu box.

 

Here is the issue.

When linking to the category pages the Cart Box Text freaks out!!

Take a look:

 

Click the PS2, XBOX and GameCuge Menu item on the left. Then look at the Cart box.

 

What is happening here!!??

 

www.ModChipGuy.com/Store

Link to comment
Share on other sites

Sean,

 

Look in your languages/english.php file. This should be what your looking for

No thats not it.

 

What I trying to use is:

3) You can have a different template for the Main Catalog Page (cPath=0) by

creating /catalog/includes/sts_templates/index.php_0.html

 

My three catagories are cPath=21, 22 and 23.

 

I added a folder in catalog/includes named sts_templates then put in three HTML files named:

index.php_21.html

index.php_22.html

index.php_33.html

 

Each of the these files are the same as the main STS HTML page.

 

I linked each image to each category above.

 

When I do this is goes to the correct catagory BUT 2 errors happen.

 

1) The Shopping cat BOX TEXT enlarges and freaks out. It seems to ignore the CSS file in OS.

 

2) When you go into any of the catagories then add a product to the cart it shows int he boc. BUT whne you click another image and go to another category the cart goes empty. It is not carrying over the cart information whne going to another category.

 

So in short, when you click on a images linked:

http://modchipguy.com/Store/index.php?cPath=21

Add a product

THEN

Click on another category image LINKED:

http://modchipguy.com/Store/index.php?cPath=22 or 23

 

The CART is empty.

 

This is a series bug. STS is not working as it should.

 

Very disappointing. I wish I had the skill to correct or find the issue. Has anyone found a way to make this work or am I doing something wrong here?

Edited by JohnnyVegas
Link to comment
Share on other sites

thank you for iecwillow, now i can go to admin page , but when i edit the product, the error is come out , please help me again , thanks a lots!!!!!!!

 

beside, how to name the template in multilingual ????

 

1054 - Unknown column 'pd.products_head_title_tag' in 'field list'

select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, pd.products_sts_templ_filename, p.products_quantity, p.products_model, p.products_image, 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 products p, products_description pd where p.products_id = pd.products_id and p.products_id = '1'

[TEP STOP]

anyone can help me?????????????? :(

Link to comment
Share on other sites

DAMN IT DAMN DAMN IT!!!

 

Looka t this. I added the ST_templates folder and put in the proper files to have custom category pages for the cart.

 

Click the "Premod Systems" link and look what happens to the BOXES ont he site.

 

This is BS!! What is the issue???

 

http://www.ModChipGuy.com/Store

Edited by JohnnyVegas
Link to comment
Share on other sites

DAMN IT DAMN DAMN IT!!!

 

Looka t this. I added the ST_templates folder and put in the proper files to have custom category pages for the cart.

 

Click the "Premod Systems" link and look what happens to the BOXES ont he site.

 

This is BS!! What is the issue???

 

http://www.ModChipGuy.com/Store

Given that it works for me and presumably for many others here you can make a reasonable assumption that it's user error.

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

QUOTE (mickeymouse @ Aug 26 2004, 09:03 AM)
Sean,

 

Look in your languages/english.php file. This should be what your looking for 

 

Sorry I'm talking about the graphics. What says $cataloglogo=oscommerce.gif for example.

 

Thanks

 

I think the file your looking for is /includes/sts_display_output.php..you can then also define your own tags in /includes/sts_user_code.php

 

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

DAMN IT DAMN DAMN IT!!!

 

Looka t this. I added the ST_templates folder and put in the proper files to have custom category pages for the cart.

 

Click the "Premod Systems" link and look what happens to the BOXES ont he site.

 

This is BS!! What is the issue???

 

http://www.ModChipGuy.com/Store

Given that it works for me and presumably for many others here you can make a reasonable assumption that it's user error.

 

Iggy

It seems like the CSS is all screwed on the categories pages.

 

I have tried everything but it just won't work correctly.

 

This is my 5th time setting up and writting code for OSC and can not figure this one out.

 

I am willing to try anyones suggestions on this one.

 

Thanks!

Link to comment
Share on other sites

Maybe on your sts file (includes/sts_templates/index.php_21.html) you should change this:

 

<link rel="stylesheet" type="text/css" href="../stylesheet.css">

 

to this:

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

I don't know if that will do anything, and maybe you have tried it, but this is what I saw immediately in your code.

 

 

hope that helps

Link to comment
Share on other sites

Maybe on your sts file (includes/sts_templates/index.php_21.html) you should change this:

 

<link rel="stylesheet" type="text/css" href="../stylesheet.css">

 

to this:

 

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

I don't know if that will do anything, and maybe you have tried it, but this is what I saw immediately in your code.

 

 

hope that helps

Whos the man!

 

That did it. I think what was happening was when I resaved the main STS to the ST_Templates folder, Dreamweaver auto changes all the links in the page. It changed the stylesheet file address to ../ though it needed to stay the same.

 

Awesome. Thank you. So angry I missed it.

Link to comment
Share on other sites

anyone has issue showing the titles. i want the title of the page to be dynamic. based onw hat product is. now in sts its static. plz help.

i cant put php code in sts_template.html file so what should i do to bring that dynamic <?title> tags from normal osc files.

Link to comment
Share on other sites

I have just upgraded from 1.8 to 1.9 then updated 1.9 to 2.01 and I am now having an error with products_info.php I get an error like this -

 

Warning: Missing argument 3 for display_price() in /home/sites/supaosc.com/public_html/resellers/includes/classes/currencies.php on line 72

 

If I remove all the updates and revert back to 1.8 I have no problems, I have sts working with totalb2b. I have tried a few fixes for this error in forums but no joy any thoughts or experience with this error?

 

I can roll back to 1.8 but 2.01 has a few extras I would like to play with.

 

Regards. and thx in advance for any feedback.

Link to comment
Share on other sites

I just installed sts version 2.1 but now when I try to view my site I get:

 

 

Template file doesn't exist: [sTS_DEFAULT_TEMPLATE]

Warning: fopen(STS_DEFAULT_TEMPLATE): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 137

Can't open Template file: [sTS_DEFAULT_TEMPLATE]

Warning: filesize(): Stat failed for STS_DEFAULT_TEMPLATE (errno=2 - No such file or directory) in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 141

 

Warning: fread(): supplied argument is not a valid stream resource in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 141

 

Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 142

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 155

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/apache/include/pear') in /usr/local/psa/home/vhosts/day3.co.uk/httpdocs/catalog/includes/sts_display_output.php on line 155

 

 

Any ideas why?

 

Thanks,

 

Peter

Link to comment
Share on other sites

THANKS!!

 

When I read your reply, my first thouht was 'DUH!!!'

 

I had made the alterations but after you suggested that, I went back and checked the changes I had made.

 

What I had done was copy the appropriate lines from a readme file but it must have been an old one because I found a newer version with more lines in it, copied that over the top and behold... instant results!

 

Thank you,

 

Peter

Link to comment
Share on other sites

Brian,

 

I've installed your contribution and had success modifying the sts_template.html file in the catalog/includes directory but I can't seem to take advantage of STS's other features, like the default category template or the product_info template.

 

Is there something that I need to do that's not covered in the readme file (I'm using STS 2.0 btw)?

 

For example, I created a category called Books (cPath=21). Following your directions, I created an "sts_templates" subfolder under "includes" and created the file, "index.php_21.html" and threw a few tags on it for testing purposes. However, osCommerce seems to ignore my changes completely as I see nothing happening in my site. The same holds thru for the product_info.php.html-SAMPLE file. I did as as the readme suggests, renaming it to product_info.php.html and placing it in the sts_templates folder but again, nothing happens.

 

Any help you (or anyone else in the know) could give is greatly appreciated.

 

Thanks,

 

Rick

Link to comment
Share on other sites

Rick,

 

Only thing I can suggest is to double check your installation. Many of the problems that people post here w/ installation issues is because they didn't follow all the steps. Brian's install instructions are really good and if followed 100% should give you a running shop w/ sts. Mine worked on the first try through and I'm running OSC MS 2.2 w/ Linda's Shoppe Enhancement Controller (which btw is incredible and will give a complete running detailed shop w/ STS added, including full attribute capability, not only drop down menu's but radio buttons, check boxes and text attributes, quantity discount pricing, and the rest of the whole deal)

 

hth a little

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

Hi There MickeyMouse,

 

Have you been able to get product specific templates to work? I've been trying for a while with no luck.

 

Thanks,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

pj,

 

The $headcontent tag is commented out on the sample sts_template.html file. You'll have to uncomment it, although the easiest thing is just to design your own header in your html file and use the rest of the tags to do the dirty work!

 

Greg

I only do what my Rice Krispies tell me to do!

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