Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

The header class is set to a height of 60 pixels in the stylesheet, so your logo and slider are both overflowing. Try using Firebug in Firefox, or the site inspector in Chrome, to find the styles that apply to a given element. It saves a lot of time.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi guys - not sure what thread to post this in, but since it's along the same lines as my other discussion here I figured I'd add it here as well.

 

I have got quite a bit accomplished on changing the look/feel of a stock osC site and adding modules and such, but I am not finding two bits of coding info that would really help me.

 

1. In header.php I have a slideshow that I only want to show on index.php - no other pages need to have this. How do I tell it to only show on index.php? Currently I borrowed this bit of code - but I have found the slideshow still shows up on product pages in product_info.php - anyone have the right code to only show if the current page is index.php?

<?php
  if ($category_depth != 'nested' && $category_depth != 'products') {
 require(DIR_WS_INCLUDES . 'slideshow.php');
 ?>

2. Underneath of the slideshow I have created links - 3 of these links go to products on product_info.php.  I have tried modifying code from product_listing.php

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

To something like

<a href="<?php ' . tep_href_link(FILENAME_PRODUCT_INFO, ('cPath=26' . '&' . 'products_id=42') . ' ?>">

But I get the following error: Parse error: syntax error, unexpected 'cPath' (T_STRING) in ....catalog/includes/header.php on line 80

 

I have tried putting a dollar sign in front of cPath and products_id and I get this error: Parse error: syntax error, unexpected '$cPath' (T_VARIABLE) in .....catalog/includes/header.php on line 80

 

Does anyone know what I am doing wrong here? I haven't had to create a link this way in over 4 years and then it was in STS which was different as well.

 

PS - I have also tried using <a href="<?php ' . tep_href_link(FILENAME_CONTACT_US) . '?>"> for a contact us link on the index page outside of the information box, and it doesn't load anything - the source code shows <a href=" ">  ?

 

If anybody has answers to either of these two issues it would be greatly appreciated :-)

Edited by TracyS

~Tracy
 

Link to comment
Share on other sites

1. Try this:

<?php
  if ( $PHP_SELF == 'index.php' && $current_category_id == 0 ) {
     require(DIR_WS_INCLUDES . 'slideshow.php');
  }
 ?>

2. And this:

<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=26&products_id=42'); ?>">

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

THANK YOU!!!

 

Beautiful!! :-)

 

~ Tracy

 

 

1. Try this:

<?php
  if ( $PHP_SELF == 'index.php' && $current_category_id == 0 ) {
     require(DIR_WS_INCLUDES . 'slideshow.php');
  }
 ?>

2. And this:

<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=26&products_id=42'); ?>">

Regards

Jim

~Tracy
 

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