Jim Smith Posted May 23, 2003 Posted May 23, 2003 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 Quote
Jim Smith Posted June 2, 2003 Author Posted June 2, 2003 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 Quote
Guest Posted June 2, 2003 Posted June 2, 2003 i haven't installed that contribution, but I am assuming the command fetches your full domain for secure and non-secure. Until the missing function can be found I would just hardcode the variables to $http_domain = http://sterlingtape.blarneystone.com/catalog $https_domain = https://sterlingtape.blarneystone.com/catalog it may or may not require the catalog bit - I'm just guessing Quote
ricardo Posted June 9, 2003 Posted June 9, 2003 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!! Quote
rimshot Posted June 26, 2003 Posted June 26, 2003 Just wanted to say thanks, I had the same problem. -drew Quote
Recommended Posts
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.