Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help debugging??


joma

Recommended Posts

i need a little help debugging this bit of script

 

if { (!strstr($_SERVER['PHP_SELF'],'products_new.php'))

} echo{ $info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2 color=#FF0000><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCTS_NEW . '</a></b></font>');

                else{

            $info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCTS_NEW . '</a></b></font>');

 

any help would be great, basically it is just a mod im putting in my new categories box to link to my new products, but i want it to be so when im in new products it will show up in the categories as red, like the new categories enhancement mod. Thanks guys

Link to comment
Share on other sites

it is ok, i worked it out if anyone wants to use this link at the bottom of their category then use this code

 

if ( (basename($PHP_SELF) != FILENAME_PRODUCTS_NEW)) {

$info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCTS_NEW . '</a></b></font>');

}else{

$info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '"><span class="errorText">' . BOX_INFORMATION_PRODUCTS_NEW . '</a></b></font></span>');

 

email me on joma"AT"austarnet.com.au if u need any help or visit

http://www.caravanmart.com.au for a demo. later

Link to comment
Share on other sites

sorry guys try this one

 

 

if ( (basename($PHP_SELF) != FILENAME_PRODUCTS_NEW)) {

$info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . BOX_INFORMATION_PRODUCTS_NEW . '</a></b></font>');

}else{

$info_box_contents[] = array('align' => 'left',

                              'text'  => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '"><span class="errorText">' . BOX_CATEGORY_PRODUCTS_NEW . '</a></b></font></span>');

 

email me on joma"AT"austarnet.com.au if u need any help or visit

http://www.caravanmart.com.au for a demo. later

 

You will also have to add

 

define('BOX_CATEGORY_PRODUCTS_NEW', 'Newest Products');

 

to catalog/includes/languages/english.php

Link to comment
Share on other sites

FAR OUT !!!!!!! I AM PRONE TO MISTAKES IM SURE....stupid ones aswell.....

 

follow this

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

 

basically this is just a mod to add a link from your categories box to products_new.php, best used with categories enhancement mod, it is very simple

 

open catalog/includes/boxes/categories.php and find

---------

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

it is at the far bottom of the file

 

replace with

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

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

if ( (basename($PHP_SELF) != FILENAME_PRODUCTS_NEW)) {

$info_box_contents[] = array('align' => 'left',

'text' => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '">' . BOX_CATEGORY_PRODUCTS_NEW . '</a></b></font>');

}else{

$info_box_contents[] = array('align' => 'left',

'text' => '<font size=-2><b><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'NONSSL') . '"><span class="errorText">' . BOX_CATEGORY_PRODUCTS_NEW . '</a></b></font></span>');

}

 

You will also have to add

 

define 'BOX_CATEGORY_PRODUCTS_NEW', 'Newest Products');

 

to catalog/includes/languages/english.php

 

email me on joma"AT"austarnet.com.au if u need any help or visit

http://www.caravanmart.com.au for a demo. later

Link to comment
Share on other sites

  • 10 months later...

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