Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Development] Products Specifications


kymation

Recommended Posts

So you want to reset all of the filters at once, not just one filter. There's no way to do that in the current code. You're going to have to write some custom code to do that.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

So you want to reset all of the filters at once, not just one filter. There's no way to do that in the current code. You're going to have to write some custom code to do that.

 

Regards

Jim

Wouldn't that just be a simple link to the current category as all filters are passed as get parameters ?

On my site it works with just the category id, although passing the full path would be better as just using the category_id will give duplicate pages for google and breadcrumbs with just the last crumb ....

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

  • 9 months later...

Hi all, I'm trying to implement Products Specifications (really great contrib!) inside my very heavily customised OSC, originally based on 2.2

It's all fine except for categories.php.

Everything seems ok, but the tab that would be supposed to include product_specifications_input.php it's just empty: no textarea, no checkbox or else.

 

I reviewed all categories.php and I believe I correctly implemented this:

<td>

          <?php

// Products Specifications

      require (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS_INPUT);

?>

</td>

 

Could there be any issues with Admin Access with Levels contrib?

thank you.

Link to comment
Share on other sites

@@Yak39  Oops, you meant on the Admin side. Sorry, I misread that.

 

Do you have specifications set up that would apply to this category? If so, there may be a conflict with some other addon.

 

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Jim,

apologies I forgot to mention I was talking about the Admin side!

I've created a dummy specification that applies to all of the categories.

 

I noticed that the textboxes of Header Tags Seo have disappeared after I included the product tabs addon that comes with Product Specifications.

I'm pretty sure there's either some conflict of I just put the php request too early in the code.

 

I don't see any "formal" coding error nor I get any error messages. I'm really kind of lost.

Main contribs I'm think of as possible conflicts:

Admin Access Level 
MVS (but I guess you could tell me more about that ;) )

Header Tags SEO.

 

Any experience with those?

 

thanks a lot.

Link to comment
Share on other sites

It sounds like an error in your editing of the admin/categories.php file. Editing the wrong location in that file would certainly cause the problem. You should have replaced the textbox for the product description with the new code. I would take a close look at the file using a file comparison program (Meld, Winmerge, etc.)

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks for the feedback: haven't figured it out a 100%, but at least I got it working.

Did not modify categories.php,  but by creating an empty specification group with text area and not filled by any previous data set from existing tables product_specifications_input.php shows up.

Question is why anything else does not.

But I'll look deepe into categories.php as you mentioned.

Link to comment
Share on other sites

  • 3 years later...

@kymation
Hi Jim,

Thank you very much for this great addon. I am trying to upgrade a 2.3.1 database into 234.1 Edge version. So installed all addons in 2.3.1 into 234.1 Edge too. It working great in 2.3.1 version. With 234.1 Edge, somehow the TAB not working as 2.3.1 version, it is more like a list. Please find the images attached for front-end and admin site. Any idea what I did wrong and which file i should modify?

Many thanks in advance. Lyn

 

 

Error-Admin-01.PNG

Error-FrontEnd-01.PNG

Link to comment
Share on other sites

Sorry I took so long to answer; life is a bit crazy right now. The code does output tabs as a list, then the jQuery/Bootstrap[ code makes those list items look like tabs. It appears that some of your Bootstrap code is not loading. Check that you have the latest template_top.php and that all of the files it calls are in the proper location.

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 3 years later...

Hi,

If i choose some multiple selection in the filters, then change the currency, the page load and the selected specifications are unchecked. You have a quick fix for this ?

I think the default osc2.3.4 tep_get_all_get_params function can't handle arrays in the url.

For example this url

https://www.domain.com/products_filter.php?f28[3]=Samsung&f22[1]=Blue&cPath=220_83_97

Become like this after I change currency:

https://www.woodandgas.com/products_filter.php?cPath=220_83_97&currency=EUR

The filter parameters disappeared.

Link to comment
Share on other sites

I changed this in includes/functions/general.php

function tep_get_all_get_params( $exclude_array = 'allow' ) {
	global $HTTP_GET_VARS;

	if ( !is_array( $exclude_array ) )$exclude_array = array();

	$get_url = '';
	if ( is_array( $HTTP_GET_VARS ) && ( sizeof( $HTTP_GET_VARS ) > 0 ) ) {
		reset( $HTTP_GET_VARS );
		while ( list( $key, $value ) = each( $HTTP_GET_VARS ) ) {
			if ( is_string( $value ) && ( strlen( $value ) > 0 ) && ( $key != tep_session_name() ) && ( $key != 'error' ) && ( !in_array( $key, $exclude_array ) ) && ( $key != 'x' ) && ( $key != 'y' ) ) {
				$get_url .= $key . '=' . rawurlencode( stripslashes( $value ) ) . '&';
			}
		}
	}

	return $get_url;
}

To this

function tep_get_all_get_params($exclude_array = '') {
    global $HTTP_GET_VARS;

    if ($exclude_array == '') $exclude_array = array();

    $get_url = '';

    reset($HTTP_GET_VARS);
    while (list($key, $value) = each($HTTP_GET_VARS)) {
      if (($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array))) 
	  {
		  if (is_array($value)) {
    		while (list($key2, $value2) = each($value)) {
    			$get_url .= $key . '['.$key2.']=' . rawurlencode(stripslashes($value2)) . '&';
  			}
		  } else {
		  	$get_url .= $key . '=' . $value . '&';
		  }
	  }
    }

    return $get_url;
  }

Now the filter arrays work fine when changing currency. Hopefully I didn't mess with  something else.

 

Link to comment
Share on other sites

  • 6 months later...
2 hours ago, Psytanium said:

How can I hide the filter in a category that don't have any assigned specification ? Something like: if (Filter exist)  require( DIR_WS_MODULES . 'products_filter.php' );

Found it, I used the function if ( tep_has_spec_group ($current_category_id, 'show_filter') == true )

But I moved the function from products_specification.php to general.php

Link to comment
Share on other sites

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