Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I feel kind of lost. There is so much files for STS... Is there a full pack with all fixes and so? By the way, :blush: , does anyone knows a nice and esay (with full of picture) tutori for STS. I love webdesgin and I would like to contribute with some nice ready made templates.

I use a lote dreamweaver MX but, unlike Mambo os, I haven?t found yet an extension for oscommerce. If you found it, let me know! :thumbsup:

 

Regards

Link to comment
Share on other sites

Should work fine without too much trouble. I've installed it and got it working. Just follow the instructions in the contrib and diff the files if you've modified them much.

 

Iggy

 

Thanks for the reply, Iggy, but I think :blink: I did follow the instructions. The $regularprice (at least on my install) returns only the products_price from the products table. With SPPC, it should return the value of the customers_group_price from the appropriate row in the products_groups table, based on the customers_group_id of the customer.

 

I'm in conversation with the author of SPPC, so "we" can add the necessary code to STS, but we don't know where the code is in STS to derive the $regularprice.

 

Can anyone help here?

 

Thanks a lot.

Mike in Key West

Link to comment
Share on other sites

First off,

 

This is a great tool and someone please tell me where to donate for this. Secondly, where do I restrict the width of the content portion? It is blowing my template all out of whack...

 

Thanks again..

Link to comment
Share on other sites

Hello all,

 

I have a weird thing going on since I installed the STS. I had to merge the files to get it to work correctly but now when I add something to the shopping cart it always adds one more. Meaning if I added 250 it would show 251 in the cart. Is there a setting to adjust this? Any suggestions?

 

Thanks,

 

Mark

Link to comment
Share on other sites

Thanks for the reply, Iggy, but I think  :blink: I did follow the instructions.  The $regularprice (at least on my install) returns only the products_price from the products table.  With SPPC, it should return the value of the customers_group_price from the appropriate row in the products_groups table, based on the customers_group_id of the customer.

 

I'm in conversation with the author of SPPC, so "we" can add the necessary code to STS, but we don't know where the code is in STS to derive the $regularprice.

 

Can anyone help here?

 

Thanks a lot.

 

Are you installing SPPC 4.0? I've had success with 3.51 but haven't had a chance to give 4.0 a shot. STS really shouldn't require any hacks to get things working as it's just a wrapper to chunks of osC so I wouldn't assume you'd have to do anything to STS unless you're using the product_info template as well. Is that the case?

 

Iggy

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

Link to comment
Share on other sites

Are you installing SPPC 4.0? I've had success with 3.51 but haven't had a chance to give 4.0 a shot. STS really shouldn't require any hacks to get things working as it's just a wrapper to chunks of osC so I wouldn't assume you'd have to do anything to STS unless you're using the product_info template as well. Is that the case?

 

Iggy

 

Yep, it's SPPC 4.1.1 (which is a kick-ass contribution, by the way--way cleaned up now). And yes, the issue in question is that we have created a product_info.php.html. On that page, we are using the $regularprice display field, but it is displaying the "wrong" price. We want our wholesale customers to see the wholesale price, but our new STS-driven page is showing the retail price.

 

Our thought is that, if we can find where STS sets the value of $regularprice, we can add the necessary logic to get the price for the appropriate customer_group_id.

 

Does ANY of this make sense? :blink: I'm often not sure I know what I'm talking about.

 

Thanks.

 

Mike

Mike in Key West

Link to comment
Share on other sites

I need some help,

 

I have it up and running, but it seems to display odd font sizes (not obeying css) after a page refresh or as soon as I enter the cart itself...

 

any ideas?

 

Can I post the sample url:

 

http://beyond-nutrition.chilliwackstorm.co...t-online-store/

 

Looks fine in the home page view, but if you click a product etc.. the font blows out...

Link to comment
Share on other sites

Yep, it's SPPC 4.1.1 (which is a kick-ass contribution, by the way--way cleaned up now).? And yes, the issue in question is that we have created a product_info.php.html.? On that page, we are using the $regularprice display field, but it is displaying the "wrong" price.? We want our wholesale customers to see the wholesale price, but our new STS-driven page is showing the retail price.

 

Our thought is that, if we can find where STS sets the value of $regularprice, we can add the necessary logic to get the price for the appropriate customer_group_id.

 

Does ANY of this make sense?? :blink: I'm often not sure I know what I'm talking about.

 

Thanks.

 

Mike

 

Just for giggles confirm that the mod works using the osC product_info.php. Or have you done that already?

 

It'll be a while before I upgrade to 4.x but I have to eventually. It's too cool not to, but I can't say I'm looking forward to it =]

 

Iggy

Edited by Iggy

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

Link to comment
Share on other sites

I need some help,

 

I have it up and running, but it seems to display odd font sizes (not obeying css)

it looks like you haven't set the font-size

 

if you add:

td {
font-size: 9pt;
}

to your stylesheet, the size changes accordingly

 

Not sure if its related, but I noticed that you have quite some styles under #products in the stylesheet, but I don't see any id="products" in your HTML source

Link to comment
Share on other sites

Yep, it's SPPC 4.1.1 (which is a kick-ass contribution, by the way--way cleaned up now).  And yes, the issue in question is that we have created a product_info.php.html.  On that page, we are using the $regularprice display field, but it is displaying the "wrong" price.  We want our wholesale customers to see the wholesale price, but our new STS-driven page is showing the retail price.

 

Our thought is that, if we can find where STS sets the value of $regularprice, we can add the necessary logic to get the price for the appropriate customer_group_id.

 

Does ANY of this make sense?  :blink: I'm often not sure I know what I'm talking about.

 

Thanks.

 

Mike

 

The $regularprice field is built inside includes/sts_product_info.php and displays only the "osc original price".

I think the cleanest way to display the SPPC is to create a new field that will contain the SPPC price and use this new field inside your template. Check sts_product_info.php to see how it's done.

 

I hope it helps a bit

 

- Rigadin

Link to comment
Share on other sites

The $regularprice field is built inside includes/sts_product_info.php and displays only the "osc original price".

I think the cleanest way to display the SPPC is to create a new field that will contain the SPPC price and use this new field inside your template. Check sts_product_info.php to see how it's done.

 

I hope it helps a bit

 

- Rigadin

 

Thanks for the suggestion. JanZ, the moderator and current "author" of SPPC has given me the following code to place in sts_product_info.php, beginning around line 28. It is, I feel, the correct solution.

 

// Get product information from products_id parameter
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id 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_info = tep_db_fetch_array($product_info_query);

// BOF Separate Price per Customer

   if(!tep_session_is_registered('sppc_customer_group_id')) { 
   $customer_group_id = '0';
   } else {
    $customer_group_id = $sppc_customer_group_id;
   }

      $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
      if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
      $product_info['products_price']= $scustomer_group_price['customers_group_price'];
}
// EOF Separate Price per Customer

$template['regularprice'] = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

 

Rather than create a new field, Jan's solution calculates the $regularprice, using the SPPC rules.

 

I've added this code and it works. If there's a way to get it into STS, or at least into the doc, that would be great.

 

Thanks for your help.

Mike in Key West

Link to comment
Share on other sites

This is a good solution, better than what I proposed.

This script cannot be inserted into the original STS script as it will generate an error to those who do not have SPPC installed, but it would be nice to put it in the doc of SPPC.

 

- Rigadin

Link to comment
Share on other sites

I'm having an issue with displaying OSC errors with STS. That is, when there is an error in the Payment Page for example, OSC simply returns the user to the payment page, without posting an error anywhere on the page. However, if one looks at the URL, they see

 

.../select_payment.php?error_message=There+has+been+an+error

 

Can anyone tell me if there is something special I need to do in STS to get this to display to the customer? Is there a tag that needs to be added to the template? Or is this an issue with the payment module?

John Skurka

Link to comment
Share on other sites

I'm having trouble, all of a sudden it seems, with 2 body tags loading on a OSC-STS installation at http://atlanticfasteners.com/cart/index.php?cPath=22 The site was working fine, then with no changes made other than a move to another server and adding an SSL certificate, all pages include 2 body tags and enclosed code. In other words, the standard OSC page AND the STS template are loading. Any ideas why?

Link to comment
Share on other sites

It has being a while since I posted here.

 

I was wondering if anyone has the same problem, I just find out today.

 

Well the problem is with the Shopping Cart. When The user is not logged on it would show. O Items on Cart , but when the costumer shows up it would show something like this:

 

_____________________

$0.00

 

Instead of the items showing like this:

 

0 items

 

Anyone know what the problem might be? Has anyone encountered that before?

Link to comment
Share on other sites

I'm having an issue with displaying OSC errors with STS. That is, when there is an error in the Payment Page for example, OSC simply returns the user to the payment page, without posting an error anywhere on the page. However, if one looks at the URL, they see

 

.../select_payment.php?error_message=There+has+been+an+error

 

Can anyone tell me if there is something special I need to do in STS to get this to display to the customer?  Is there a tag that needs to be added to the template?  Or is this an issue with the payment module?

 

What version of osCommerce are you using? If it's 2.2MS2, then you should not have "error_message" but 2 other parameters, one giving the module code and the other the error message. Look for an update of the module.

 

If it's 2.2MS1, then I can't help.

 

- Rigadin

Link to comment
Share on other sites

I'm having trouble, all of a sudden it seems, with 2 body tags loading on a OSC-STS installation at http://atlanticfasteners.com/cart/index.php?cPath=22 The site was working fine, then with no changes made other than a move to another server and adding an SSL certificate, all pages include 2 body tags and enclosed code. In other words, the standard OSC page AND the STS template are loading. Any ideas why?

 

There is no <!--$headcontent--> tag in your template, and many things in your header that probably put mess with STS.

Find in the doc the part that speak about <!--$headcontent--> and try to start from an empty header and add your home-made stuffs one by one.

 

Check also your categories menu with Mozilla, it does not work well, at least for me.

 

- Rigadin

Link to comment
Share on other sites

There is no <!--$headcontent--> tag in your template, and many things in your header that probably put mess with STS.

Find in the doc the part that speak about <!--$headcontent--> and try to start from an empty header and add your home-made stuffs one by one.

 

Check also your categories menu with Mozilla, it does not work well, at least for me.

 

- Rigadin

 

Yes, my template needs some work, however, I have the problem even when I use the default template that comes with STS. Also my template works on the old server (the problem started with a server move): http://69.93.144.211/cart/

Link to comment
Share on other sites

What version of osCommerce are you using? If it's 2.2MS2, then you should not have "error_message" but 2 other parameters, one giving the module code and the other the error message. Look for an update of the module.

 

If it's 2.2MS1, then I can't help.

 

- Rigadin

 

Exactly how do I determine which version I'm using for sure?

John Skurka

Link to comment
Share on other sites

Exactly how do I determine which version I'm using for sure?

 

open catalog/includes/application_top.php and there should be this line quite near the top, if you are running MS2:

 

// define the project version
 define('PROJECT_VERSION', 'osCommerce 2.2-MS2');

Link to comment
Share on other sites

Hey guys,

I finally got the sts_template.html to work. But now none of the individual pages work. Like for example product_info.php.html in the includes/sts_templates it wont use that or any of them. It keeps using the sts_template.html on everything, every page since i have it set for $content.

 

http://products.desatech.com/

 

click on heaters on the side and you will see what i mean, it keeps using only the sts_template.html

 

Does anybody know how to make it use the ones its suppose to be using under the sts_templates/ directory? I posted my configure.php file eariler up. Please help!

Link to comment
Share on other sites

To richhoward:

 

You have STS v2.01 installed, but have you made the update dated 25 Aug 2004?

Your problem is in catalog/includes/sts_display_output.php with the variable $scriptbasname which should, and it's not your case, contains the name of running script (product_info.php for example).

 

- Rigadin

Link to comment
Share on other sites

Hi,

 

I'm repeating (and resuming) this question from several days ago. Please, can somebody help me ? I'm still having the same trouble:

 

 

I'm using STS, but I'm having a little problem: I've just finished setting up my shopping cart, but in "manufacturers" (which I call "artists", I'm selling CDs), it always send me to the index page, no matter which artist I choose. I'm having the same trouble from the "artist Info, more products" links.

 

In the other hand, the box with the "all manufacturers" text in, in the category page -where the products per category are displayed- works correctly.

 

I'm sure that each product has a manufacturer assigned to it.

 

My site: www.costaqmusic.com

 

Thank you,

Shutiri.

Link to comment
Share on other sites

Please dont flame, i know this question has probably been asked but i *did* search the forums for like 20 minutes before posting:

 

I'm using STS, which doesnt use the header.php. So my flash banner at the top of the page reloads everytime the page reloads.

 

Is there anyways to use the header.php and STS?

 

http://www.designerbuyout.com <----you'll see what i mean.

Link to comment
Share on other sites

I would like to have $imagelarge return images from a custom folder \catalog\images\largeimages instead of from the value of DIR_WS_IMAGES (typically \catalog\images).

 

Can someone point me to the "best" place to make this change?

 

Thanks.

 

Mike

Mike in Key West

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