Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I've been spending lots of time digging through the forum archives trying to find an answer to this and I'm more confused than ever and need help. I'm looking to have two features available in the attributes: (1.) Be sortable, and (2.) use various input devices including (a.) radio buttons, (b.) dropdown, (c.) fill-in text, (d.) check boxes.

 

The only thing I found in the contributions that seems to include sorting plus radio buttons, text fields and the other input devices is the "Attributes option type selection", #766. When I try to install that on a clean installation of the latest version of OSCommerce (tep_snapshot-20030521.zip), I get the following error message on my catalog page:

 

Fatal error: Call to undefined function: tep_get_top_level_domain() in /usr/local/etc/httpd/vhosts/sterlingtape.com/catalog/includes/application_top.php on line 104

 

(You can see it at http://sterlingtape.blarneystone.com/catalog/)

 

I saw another reference to some difficulties with this module in which someone suggested that the author of the contribution is too swamped to offer any support.

 

In light of all that, my questions are:

1. Is there a module that will work with the recent versions of OSC that offer the attribute inputs plus is sortable? Or...

2. Are there a couple of (or group of) modules that won't overwrite each other, that will meet that need? Or...

3. Is there someone out there that would be eager to help a PHP-challenged guy to create something like that? If so, would there be a (hopefully very nominal) cost to do so?

 

Thanks,

 

Jim Smith

  • 2 weeks later...
Posted

I finally got rid of the fatal error message:

"Call to undefined function: tep_get_top_level_domain()"

but I don't know what I might have broken in the process <gulp>. I commented out the

// $http_domain = tep_get_top_level_domain(HTTP_SERVER);

// $https_domain = tep_get_top_level_domain(HTTPS_SERVER);

in the catalog/includes/application_top.php file. My question is, what does that command do and what problems should I anticipate by doing that?

 

So far, the commenting out of those lines works; I'm finally able to go in and test the "Attributes option type selection", #766 contribution and it seems to be working (finally). The one thing I can't get it to do is a text box. To me, a text box is one that I can input info into. This program gives me the ability to preselect some text to put in there but it is not a text box that allows the buyer to input their own text. Anyone know if there is a way to make that text box interactive?

 

Thanks,

Jim Smith

Posted
I finally got rid of the fatal error message:

"Call to undefined function: tep_get_top_level_domain()"

but I don't know what I might have broken in the process <gulp>. I commented out the

// $http_domain = tep_get_top_level_domain(HTTP_SERVER);

// $https_domain = tep_get_top_level_domain(HTTPS_SERVER);

in the catalog/includes/application_top.php file. My question is, what does that command do and what problems should I anticipate by doing that?

 

So far, the commenting out of those lines works; I'm finally able to go in and test the "Attributes option type selection", #766 contribution and it seems to be working (finally). The one thing I can't get it to do is a text box. To me, a text box is one that I can input info into. This program gives me the ability to preselect some text to put in there but it is not a text box that allows the buyer to input their own text. Anyone know if there is a way to make that text box interactive?

 

Thanks,

Jim Smith

 

Jim,

 

Look in your include/functions/general.php for the folowing lines :

function tep_get_top_level_domain($url) {

   if (strpos($url, '://')) {

     $url = parse_url($url);

     $url = $url['host'];

   }



   $domain_array = explode('.', $url);

   $domain_size = sizeof($domain_array);



   if ($domain_size > 1) {

     if (is_numeric($domain_array[$domain_size-2]) && is_numeric($domain_array[$domain_size-1])) {

       return false;

     } else {

       return $domain_array[$domain_size-2] . '.' . $domain_array[$domain_size-1];

     }

   } else {

     return false;

   }

 }

 

If they are not in the general.php file put it in there

;)

 

Good Luck!!

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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