Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Products Specifications


kymation

Recommended Posts

Create the color filter and the price filter separately. If the customer chooses, for example, blue and $0 - $100, the page will show only blue items that cost less than $100.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 4 weeks later...

That's a sort order, not a filter.  That capability exists already in some versions of osCommerce. I can't say what yours does without more information.

 

Regards

Jikm

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

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

I have this excellent addon running and works perfect on the customer front end but i am noticing a huge slowdown on my admin back end when editing a product in categories.php specifically when fckeditor loads and the tabs are populated etc. Any ideas ?

Link to comment
Share on other sites

There are a lot of database calls involved and those can be slow. I don't have any quick fix for this, but it might be possible to optimize them for your particular situation. A general solution is probably impossible due to the number of options involved.

 

Also, are you running the latest version of CKEditor? Some older versions were really slow if you had a large number of textarea fields. Try turning the editor off temporarily and see if that makes a speed improvement.

 

Regards

Jim

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

Link to comment
Share on other sites

You should be able to just replace the files. I don't know how well that will work with such a major difference in version. Back up your old files in case it doesn't work.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 2 months later...

Hi Marco

 

You are welcome to share your code with us. Since PS is so large, I suggest attaching files rather than posting the code inline. Or you can send me the files and I'll host them for you. Whatever way works the best for you.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 7 months later...

Hello,

My website use both, the sorting (e.g. by price low to high), and specification filters.

if I select some specification filters first THEN select a sorting option, the filters reset.

Any advice how to keep the filter selection after I apply a sorting ? is the addon compatible with the default sorting option of osc ?

Thanks

Link to comment
Share on other sites

22 hours ago, kymation said:

This should be working. What version of osCommerce are you using, and what version of this Addon?

Regards

Jim

Im using 2.3.4 with the latest version of this addon (sept 2011).

My osc don't have a sorting drop down option by default, so I installed this addon

I think I should add a line to this code to preserve the filter parameters in URL :

<div id="sort" class="col-xs-8 col-sm-4 col-md-3 pull-right">
	  <?php
	  echo tep_draw_form('sort', $PHP_SELF, 'get');	

	  echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ;
	  echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :'');									
	  
	  echo tep_draw_pull_down_menu('sort', $products_sorter_array, '', 'onchange="this.form.submit()"');
	  echo tep_hide_session_id() . '</form>';
	  ?>
      </div>

 

Link to comment
Share on other sites

i replaced

echo (isset($_GET['cPath']) ? tep_draw_hidden_field('cPath', $_GET['cPath']) : '') ;
echo (isset($_GET['filter_id']) ? tep_draw_hidden_field('filter_id', $_GET['filter_id']) :'');	

With

foreach ( $_GET as $key => $value ) {
	echo( isset( $_GET[ $key ] ) ? tep_draw_hidden_field( $key, $_GET[ $key ] ) : '' );
}

 

Edited by Psytanium
Link to comment
Share on other sites

That will work in most cases. It may fail if you have a GET parameter that is being changed, so that you end up with both the old and new values. I would spend some time testing this before using it in a live store.

Regards

Jim

 

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

Link to comment
Share on other sites

18 minutes ago, kymation said:

That will work in most cases. It may fail if you have a GET parameter that is being changed, so that you end up with both the old and new values. I would spend some time testing this before using it in a live store.

Regards

Jim

 

Thanks for the warning. i changed it to this and its working

foreach ($_GET as $key => $value) {
	if ($key != 'sort') {
		echo( isset( $_GET[$key] ) ? tep_draw_hidden_field( $key, $_GET[$key] ) : '' );
	}
}

 

Link to comment
Share on other sites

  • 8 months later...

Hello,

I have a pull down filter with some values, i want to change the value name, when I do, the filter did not recognize the change.

I will have to go to each product and change the specs ? How can I change the value name without problems ?

e.g. in a specification called Colors, I change the value Blue to Red, now the front end filter do no include the value Red in the drop down menu. but in the back end / categories, the product specification changed from Blue to Red.

Thanks

Edited by Psytanium
Link to comment
Share on other sites

I found that when changing the filter value, the table products_specifications  is not updated. is it something wrong with my installation or the addon do not update teh products_specifications  table when changing the value name ?

Link to comment
Share on other sites

That's a bug. I think you'll have to update using the product page in the Admin. You could also run a SQL snippit on your database to make the change.

Regards

Jim

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

Link to comment
Share on other sites

On 5/5/2018 at 8:23 PM, kymation said:

That's a bug. I think you'll have to update using the product page in the Admin. You could also run a SQL snippit on your database to make the change.

Regards

Jim

If i replace my addon files with new downloaded files, the problem will get solved ? or is it a bug already exist in the addon ? thanks

Link to comment
Share on other sites

The bug exists in the current version of the Addon. Store owners don't change the value names often, so this hasn't come up before.

Regards

Jim

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

Link to comment
Share on other sites

On 5/7/2018 at 7:42 PM, kymation said:

The bug exists in the current version of the Addon. Store owners don't change the value names often, so this hasn't come up before.

Regards

Jim

i tried to understand how the addon work and find a solution. but i can't. if its easy for you, maybe you can post a fix or some ideas... should we modify the database tables ? or just addon files ?

Link to comment
Share on other sites

  • 3 years later...

Hello,

On a  2.3.4 shop with PS 1.1.11 following error  displays by  filtering on TABLE_PRODUCTS_DESCRIPTION  fields:

1054 - Unknown column 'products_name' in 'where clause'

select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) /* left join (products_description pd) on (p.products_id = pd.products_id) */ INNER JOIN products_specifications ps17 ON p.products_id = ps17.products_id where p.products_status = '1' and p2c.categories_id = '432' and products_name sounds like '%PoE%' AND ps17.specification <=> 'Oui' AND ps17.specifications_id = '17' AND ps17.language_id = '3'

[TEP STOP]

I changed a little the specification class by  adding the above custom join and the error disappears ,  but PS still wont filter on these table fields.

All other filters work perfectly,  it seems.  Did I  miss a new file or needed change in existing files?

Could someone please try to explain?

Thank you very much.

David

david

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