osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Changing Boxes

This is a discussion on Changing Boxes within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; From the OSCdox Guide, in Exercise 4 Boxes: Adding New Boxes, it says: Finally, edit the file /catalog/includes/boxes/test.php to look ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 11-19-2003, 04:47 PM
Lurker
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
RicDay
Default Changing Boxes

From the OSCdox Guide, in Exercise 4 Boxes: Adding New Boxes, it says:

Quote:
Finally, edit the file /catalog/includes/boxes/test.php to look like this:

Code:
 <?php
  $info_box_contents = array();
  $info_box_contents[] = array('align' => 'left',
                               'text'  => BOX_HEADING_TEST
                              );
  new infoBoxHeading($info_box_contents, false, false);
  $info_box_contents = array();
  $info_box_contents[] = array('align' => 'left',<?php
  $boxHeading = BOX_HEADING_INFORMATION;
  $corner_left = 'square';
  $corner_right = 'square';

  $boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
                '<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGES, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV

  require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
?>
                               'text'  => '<a href="' . tep_href_link
 (FILENAME_TESTPAGE1, '', 'NONSSL') . '">' . BOX_TEST_LINK1 . '</a><br>' .
                                          '<a href="' . tep_href_link
 (FILENAME_TESTPAGE2, '', 'NONSSL') . '">' . BOX_TEST_LINK2 . '</a><br>' .
                                          '<a href="' . tep_href_link
 (FILENAME_TESTPAGE3, '', 'NONSSL') . '">' . BOX_TEST_LINK3 . '</a><br>' .
                                          '<a href="' . tep_href_link
 (FILENAME_TESTPAGE4, '', 'NONSSL') . '">' . BOX_TEST_LINK4 . '</a>'
But the code in information.php actually looks like this:

Code:
<?php
  $boxHeading = BOX_HEADING_INFORMATION;
  $corner_left = 'square';
  $corner_right = 'square';

  $boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
                '<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGES, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
                '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV

  require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
?>
Is the documentation just old? I'm having a heck of a time, using the documentation and just adding boxes with links -- seem to be getting the always broken link syndrome, but not sure why...

Thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 11-19-2003, 09:21 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,080
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

If you look at the top category for that line of documentation, it is for MS2, not MS2-MAX. The code you have on your site is MS2-MAX code. Big difference. The MS2 docs are not old, but they are for a different build of oscommerce.

The MS2-MAX docs are in progress.

To explain a bit more about your code above, look in the /templates and /templates/content directories. That is where the HTML is. It has been moved out of the core PHP files and into template files for easier editing.

Also, compare the differences in the code. Just paste the variables from the old format into the new format. They are not that different.

That stuff actually looks like a mistake in the docs. I will have to fix that
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 03-04-2004, 01:35 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
Default

I am having a huge issue msasek, maybe you could help i wish to place another link in the information box which points to my forums URL the files im editing are

/BOXES/INFORMATION.PHP

which looked like this:


$boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
'<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV

and i changed to this:

$boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
'<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV
'<a href="'http:\/\/www.unabridgedbooks.com/forum/, '', 'NONSSL') . '"> ' . BOX_INFORMATION_FORUMS . '</a>';//link to forums added


I also edited the english.php file from this:

// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');

To this :
// information box text in includes/boxes/information.php
define('BOX_HEADING_INFORMATION', 'Information');
define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
define('BOX_INFORMATION_CONTACT', 'Contact Us');
define('BOX_INFORMATION_FORUMS', 'Forums');


Am i going about this all the wrong way??


Cliff...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-04-2004, 09:31 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,080
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

For adding new boxes and links, see this tutorial:

http://oscdox.com/modules.php?op=mod...gNewBoxesToMax

If all you want to do is add an external link to your page, you could do it by just adding the actual link and text instead of making a new define for it.

So your code would look like this in information.php:

Code:
	'<a href="http://yourforums.com">Forums</a><br>' .
And the link is added.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 03-04-2004, 10:47 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
Default

this code doesnt work, first if you dont escape the two forward slashes, it turns the rest orange which in dreamweaver means escaped and there fore not read.

using the code as you have supplied doesnt work check www.unabridgedbooks.com/catalog and you'll see it doesnt even show up in the box.


This is my code:
$boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
'<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV
'<a href="http://www.unabridgedbooks.com/forum/">Forums</a><br>' .//link to forums added

Is it not correct? please check URL.

Cliff,,,
__________________
Clifton Murphy CEO/CTO
Hyperactive Inc.
osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 03-04-2004, 03:57 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,080
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

Works fine for me... You have not properly coded the php. You have to change the postition of the ; to the last line of the array. I assumed that you knew basic php. Sorry. My link is correct, you just did not add it correctly.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 03-04-2004, 08:32 PM
Member
 
Join Date: Jan 2004
Location: edmonton, Alberta, Canada
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
peteyg
Default

Quote:
$boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>'.
'<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV
'<a href="http://www.unabridgedbooks.com/forum/">Forums</a><br>' .//link to forums added
Code should be
$boxContent = '<a href="' . tep_href_link(FILENAME_SHIPPING) . '"> ' . BOX_INFORMATION_SHIPPING . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_PRIVACY) . '"> ' . BOX_INFORMATION_PRIVACY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"> ' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"> ' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_CATALOG_PRODUCTS_WITH_IMAGE S, '', 'NONSSL') . '">' . BOX_CATALOG_PRODUCTS_WITH_IMAGES . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a><br>' . //ICW ORDER TOTAL CREDIT CLASS/GV
'<a href="http://www.unabridgedbooks.com/forum/">Forums</a><br>'; //link to forums added

U had some spaces that were not correct and a ";" in the wrong place and also a "." where the ";" should be.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 03-04-2004, 11:35 PM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
Default

to be honest i respect your work so much i thought you were infallible, i didnt even bother to look at syntax. when you said heres the code, that was good enough for me lol


Cliff...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 03-04-2004, 11:54 PM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
Default

and nope, dont know PHP very well, I am using this software to learn, mostly why. Plus i bought the books. shouldnt be long as i am smarter than a box of rocks.

Cliff...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 03-04-2004, 11:59 PM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
Default

regardless it is interesting to note that when i add this link to the top of the array, it works fine. but if added to the bottom of the array, and moving the semi-colon to the last line, it causes a parse error. WAIT, i need a period at the end of the line i moved the semi-colon from right?

See i can learn PHP.....WOOOOT
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
change boxes background color now have double boxes ANNIE11 osCMax v1.7 General Mods Discussion 0 08-22-2005 08:16 PM
Changing Boxes dallibab osCMax v1.7 Discussion 1 08-16-2004 08:07 PM
boxes and CSS moisea osCommerce 2.2 Modification Help 6 01-08-2004 06:59 AM
Changing around info boxes...couple questions stick00 osCMax v1.7 Discussion 2 11-01-2003 11:05 PM
Help on boxes noppie osCommerce 2.2 Modification Help 2 07-21-2003 09:15 PM


All times are GMT -8. The time now is 09:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax