osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

stupid bit of easy code

This is a discussion on stupid bit of easy code within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; I just don't know why when I click on the links I'm making, it doesn't take me to the answers. ...


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-24-2004, 02:40 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default stupid bit of easy code

I just don't know why when I click on the links I'm making, it doesn't take me to the answers. I got this format from the Gift Voucher FAQ, and I'm just stripping it down and modifying it. Please oh please tell me why this stupid bit of apparently easy (but none the less diabolic) code won't work right for me.

Thanks

Code:
<?php
define('NAVBAR_TITLE', 'Product FAQ');
define('HEADING_TITLE', 'Product FAQ');

define('TEXT_INFORMATION', '
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=1','NONSSL').'">How do I attach a flag bracket in stucco?</a><br>
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=2','NONSSL').'">Can I wash my flag?</a><br>
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=3','NONSSL').'">Can I attach grommetted flags onto a sleeve style pole?</a><br>
');
switch ($HTTP_GET_VARS['faq_item']) {
  case '1':
define('SUB_HEADING_TITLE','How do I attach a flag bracket in stucco?');
define('SUB_HEADING_TEXT','test');
  break;
  case '2':
define('SUB_HEADING_TITLE','Can I wash my flag?');
define('SUB_HEADING_TEXT','We recommend that you do not wash your flag, but if you must
then we recommend gentle handwashing.');
  break;
  case '3':
  define('SUB_HEADING_TITLE','Can I attach grommetted flags onto a sleeve style pole?');
  define('SUB_HEADING_TEXT','test3');
  break;
  }
?>
The implimentation can be found on my site here...
http://www.upupandawaykites.com/catalogmax/faq.php

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 11-24-2004, 06:19 AM
andyy15's Avatar
Member
 
Join Date: Aug 2004
Posts: 63
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
andyy15
Default

I can help you get it to work check your PM.
__________________
Check out my homepage.. It\'s my jewelry website.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 11-24-2004, 08:58 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,972
Thanks: 80
Thanked 345 Times in 324 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

andy,

I appreciate your attempt to help.

For future reference, please keep the discussion in the public forums. There is no need to take this to PM. If you have help to offer, post it, I am sure others will benefit if you do. That is the point of these forums. Also, as a rule of thumb, you should not PM somebody unless they ask you to.
__________________
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!
  #4  
Old 11-24-2004, 12:12 PM
andyy15's Avatar
Member
 
Join Date: Aug 2004
Posts: 63
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
andyy15
Default

Msasek,
The reason why I did not post the answer to his question is I have to look into his files therefore he needs to provide me with more information as I need to see the whole file to get the full picture. This is why I PM'ed him if he wants to provide me with more info it is up to him. If he does I will help him out. Just looking at the post I can't solve his problem and will need more time to look into it. If he want's me to spend more time looking into it I will. I am sorry if this is a problem and will try to keep answers posted in the community.
Andrew
__________________
Check out my homepage.. It\'s my jewelry website.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 11-24-2004, 02:12 PM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default

I thought I posted enough code for it to be looked at, but I'll include everything I can think might relate to it....

First, I followed Adding New Static Content Pages made by msasek.

/faq.php
Code:
<?php
/*
  $Id: faq.php,v 1.0 2004/11/24 01:16:23 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQ);

  $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQ));

  $content = CONTENT_FAQ;
  $content_template = TEMPLATENAME_STATIC;

  require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
This is the important file!
/includes/languages/english/faq.php
Code:
<?php
define('NAVBAR_TITLE', 'Product FAQ');
define('HEADING_TITLE', 'Product FAQ');

define('TEXT_INFORMATION', '
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=1','NONSSL').'">How do I attach a flag bracket in stucco?</a><br>
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=2','NONSSL').'">Can I wash my flag?</a><br>
  <a href="'.tep_href_link(FILENAME_FAQ,'faq_item=3','NONSSL').'">Can I attach grommetted flags onto a sleeve style pole?</a><br>
');
switch ($HTTP_GET_VARS['faq_item']) {
  case '1':
define('SUB_HEADING_TITLE','How do I attach a flag bracket in stucco?');
define('SUB_HEADING_TEXT','test');
  break;
  case '2':
define('SUB_HEADING_TITLE','Can I wash my flag?');
define('SUB_HEADING_TEXT','We recommend that you do not wash your flag, but if you must
then we recommend gentle handwashing.');
  break;
  case '3':
  define('SUB_HEADING_TITLE','Can I attach grommetted flags onto a sleeve style pole?');
  define('SUB_HEADING_TEXT','test3');
  break;
  }
?>
/includes/boxes/information.php
Code:
<?php
/*
  $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $
  modified by paulm_nl 2003/12/23
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  $boxHeading = BOX_HEADING_INFORMATION;
  $corner_left = 'square';
  $corner_right = 'square';
  $box_base_name = 'information'; // for easy unique box template setup (added BTSv1.2)

  $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

  $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_FAQ) . '"> ' . BOX_INFORMATION_FAQ . '</a><br>'.
                '<a href="' . tep_href_link(FILENAME_GV_FAQ, '', 'NONSSL') . '"> ' . BOX_INFORMATION_GV . '</a>';//ICW ORDER TOTAL CREDIT CLASS/GV


// bof BTSv1.2
  if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) {
  // if exists, load unique box template for this box from templates/boxes/
      require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php');
  }
  else {
  // load default box template: templates/boxes/box.tpl.php
      require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX);
  }
// eof BTSv1.2
?>
Those should be the only files that make a difference here. I'm going to put alot more into the FAQ, but I stripped it down to a minimum so that I could debug it. This code seems so simple, yet just isn't functioning properly. If anyone can just look through this code and find my error, I would be very grateful.

Thanks

Greg
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 11-28-2004, 10:52 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default

just a friendly bump...maybe someone knows how to fix this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 11-28-2004, 10:07 PM
Member
 
Join Date: Nov 2004
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
vinces
Default

Groggory, just use this:

http://www.oscommerce.com/community/...all/search,faq
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 11-29-2004, 02:30 PM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default

Quote:
Originally Posted by vinces
Alright, I tried installing it, but when I access that FAQ it kinda breaks up my template. I'm still learning PHP so I probaly didn't take into account the BTS system. Any chance you could help me out in installing it properly. I followed the directions to a T, so basically I just need to know what to do differently.

On a sidenote....I started up a new section in the Wiki for tutorials on how to install various contributions. If we solve this I'll post all the changes in the wiki for this contrib.

THANKS!

The implimentation can be found at
http://www.upupandawaykites.com/catalogmax/faq.php
I removed the link to it in my information infobox just so my testers for the site won't get all on me for it.
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
This might be a stupid question, but... akisok2 osCommerce 2.2 Discussion 3 05-05-2006 11:27 AM
Stupid question on OSC Version Melissa osCMax v1.7 Discussion 1 12-26-2004 03:32 PM
Maybe Stupid Question? Where to Download 1.5? ryanmhubbard osCMax v1.7 Discussion 2 09-05-2004 06:16 AM
A stupid questio, sorry but i don't find... Anonymous osCMax v1.7 Installation 1 03-29-2004 03:46 AM
I must be stupid! Kristine osCMax v1.7 Installation 5 03-13-2004 09:44 AM


All times are GMT -8. The time now is 01:36 PM.


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