Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Products Specifications


kymation

Recommended Posts

I updated my jquery to 1.9.1 and now my tabs are not displaying correct. All of the tab information is showing up on the first tab. Descriptions, Reviews, Ask A Question ETC all on the first tab one under the other.

Hi this problem exist and in version 1.9.2. and version 1.10.2. I found what is the problem. In new version missing "ui-tabs-hide". Solution is the following:

In new version: 1.9.1; 1.9.2; 1.10.2 you must find section for "tabs" in 1.9.2 this section looks like this and start at row 207:

 

ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */

.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }

.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }

.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }

.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }

.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }

.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */

.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }

 

After the last row (.ui-tabs.ui-tabs-panel........), you must add the following line that I take from version 1.8.22 line 487:

 

.ui-tabs .ui-tabs-hide { display: none !important; }

 

This is correct vision of TABS in new jquery versions.

Link to comment
Share on other sites

  • 1 month later...

I'm getting a problem with the X url for the filter.

 

When I click the x the page just reloads. I did some digging and I echod the url of the X, and it looks as if it is encoded but not decoded:

 

/products_filter.php?f4%5B0%5D=0-50&cPath=21

 

The URL of the page after clicking a filter (checkbox) is exactly that as well.

 

If I remove the encoding from the url and just refresh the page to: /products_filter.php?f4=0-50&cPath=21 then clicking the X works.

 

I also have a filter that is images (exact) and when clicked the url is fine and everything works. So it is related to the checkboxes.

 

I've tried looking all over but can't seem to fix it. Any help is appreciated!

Link to comment
Share on other sites

It should use tep_get_array_get_params() from includes/functions/products_specifications.php instead of tep_get_all_get_params() from includes/functions/general.php.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi all,

 

I am having problems with the filter pulldown, I have some colours set eg red, black, blue and green. On the filter pulldown I see the colours twice, they are repeated with the product count. The pulldown looks like this:-

 

Show All

Red

Black

Blue

Green

Show All (10)

Red (2)

Black (3)

Blue (4)

Green (1)

 

I only want the options with the count in the pulldown, how do I remove these duplicates, I don't see duplicates if I switch to tick boxes??

 

TIA

Link to comment
Share on other sites

I get duplicates when we have defined new specifications and created the values, but forgot to setup filter values.

Maybe a similar problem on your site ?

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

I've never seen that before. Do you have a web page with that filter that I could look at?

 

Regards

Jim

 

I expect this is down to me having some code wrong somewhere, I have pushed the code into a loaded commerce install which has taken hours, the html I see with the spec/filter fully loaded up is pasted below, what I have found is that I pasted a block of code into html_output.php which starts "foreach ($values as $link_data) {" this seems to create the part of the pulldown with the count in brackets which I want to keep, if I comment this block I get the correct pulldown but with no product count in brackets. I am trying to work out how to correct this?

 

HTML pulldown output

 

<td class="boxText" >

<b>

Colour</b>

<br>

<form name="filter" action="products_filter.php" method="get">

<select name="f2" onchange="this.form.submit();">

<option value="0" selected="Selected">

Show All</option>

<option value="Black">

Black</option>

<option value="Blue">

Blue</option>

<option value="Green">

Green</option>

<option value="Grey">

Grey</option>

<option value="Orange">

Orange</option>

<option value="Pink">

Pink</option>

<option value="Red">

Red</option>

<option value="Violet">

Violet</option>

<option value="White">

White</option>

<option value="Yellow">

Yellow</option>

<option value="0" SELECTED>

Show All<span class="filter_count">

(107)</span>

</option>

<option value="Black">

Black<span class="filter_count">

(9)</span>

</option>

<option value="Blue">

Blue<span class="filter_count">

(13)</span>

</option>

<option value="Green">

Green<span class="filter_count">

(13)</span>

</option>

<option value="Grey">

Grey<span class="filter_count">

(16)</span>

</option>

<option value="Orange">

Orange<span class="filter_count">

(7)</span>

</option>

<option value="Pink">

Pink<span class="filter_count">

(8)</span>

</option>

<option value="Red">

Red<span class="filter_count">

(13)</span>

</option>

<option value="Violet">

Violet<span class="filter_count">

(7)</span>

</option>

<option value="White">

White<span class="filter_count">

(8)</span>

</option>

<option value="Yellow">

Yellow<span class="filter_count">

(13)</span>

</option>

</select>

<input type="hidden" name="f1" value="0">

<input type="hidden" name="cPath" value="2_3_151_159">

<input type="hidden" name="sort" value="products_name">

<input type="hidden" name="osCsid" value="afb1a1c700404d6f7dc92d9e0903d390">

<NOscript>

<input type="image" src="templates/cre65_ats/images/buttons/english/icon_next.gif" alt="Find Matching Products" title=" Find Matching Products ">

</noscript>

</form>

<br>

Link to comment
Share on other sites

This is probably a coding error. Do you have the filters enabled in your Admin config? (Configuration >> Products Specifications >> Filter Show Count)

 

Regards

Jim

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

Link to comment
Share on other sites

This is probably a coding error. Do you have the filters enabled in your Admin config? (Configuration >> Products Specifications >> Filter Show Count)

 

Regards

Jim

 

Yes that's on and if I turn it off the count in the second half of the pulldown switches off, so I need to figure out how to get rid of the top half of the pulldown.

 

I changed the case of some of the code to work out where it originates, the top half of the pulldown seems to be generated by includes/functions/products_specifications.php from this part which I presume is correct?

 

switch ($display_type) {

case 'pulldown':

$box_text .= tep_draw_form('filter', $target, 'get');

$box_text .= tep_draw_pull_down_menu ($filter_name, $filters_select_array, $filter_value, 'onchange="this.form.submit();"');

$box_text .= $additional_variables . tep_hide_session_id();

$box_text .= '<NOscript>' . tep_image_submit('icon_next.gif', TEXT_FIND_PRODUCTS) . '</noscript>';

$box_text .= '</form>';

break;

Link to comment
Share on other sites

Yes, that's the stock code, and it should be where any filter pulldown is generated.

 

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

I think it is the code in html_output.php the code I have in the output a form pull down just before the insert looks like this below, it looks very different from the contrib file in this area:-

 

// Output a form pull down menu

function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {

$field = '<select name="' . tep_output_string($name) . '"';

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' selected="Selected"';

}

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

 

 

 

// Start Products Specifications

foreach ($values as $link_data) {

Link to comment
Share on other sites

HEY, look at my earlier post - think it is a side effect of missing filters

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

HEY, look at my earlier post - think it is a side effect of missing filters

 

I did check that but it wasn't the problem, I have now fixed it, the code in html_output.php was the culprit, the tep_draw_pull_down_menu function in the original loaded commerce 6.5 needed some lines commenting out otherwise all pulldowns sitewide were being duplicated, these are what needs to be commented in case anyone else finds this problem:-

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

// for ($i=0, $n=sizeof($values); $i<$n; $i++) {

// $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

// if ($default == $values[$i]['id']) {

// $field .= ' selected="Selected"';

// }

//

// $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

// }

 

// Start Products Specifications

foreach ($values as $link_data) {

Link to comment
Share on other sites

No, the stock osCommerce Manufacturers filter is not compatible with PS. However, you can set up a Manufacturers filter in PS and import your list of manufacturers, so that will give the same result.

 

Regards

Jim

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

Link to comment
Share on other sites

hi

once i have this installed.

do you have any tips of setting up filters so that they can be filtered via a checkbox exactly like on this site here?

 

http://www.truffleshuffle.co.uk/store/advanced_search_result.php

 

so as soon as you click on the checkbox, it reloads the page with the new list of products.

 

what would i need to do in terms of html/css editing for this particular job?

 

maybe if someone has already done this, it would be great if could share any info.

 

thanks

Link to comment
Share on other sites

Read the User's Manual section on filters. There is information there on setting up filters using checkboxes. You may want to use Radio buttons instead, depending on the way you want the filters to work. Compare the instructions for the two in the manual.

 

You may need to do some CSS formatting to make the Filters box look the way you want. I have an improved filters box around here somewhere; let me know if you would like to try it.

 

Regards

Jim

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

Link to comment
Share on other sites

hi thanks

 

would your plugin,

would i be able to use the checkboxes to filter down like in that site? as in that i could filter on one specification then keep adding more and more filters to narrow down the product selection?

 

if so, thats great, i will get down to the installation and dig into the HTML,css.

Link to comment
Share on other sites

Yes, that's how the filters work. This is fairly standard for stores that use filters, like the one you linked above.

 

You do have to set up all of the specifications that you want to filter on and add the data to each product for those specifications. Then you can set up filters to act on that data.

 

Regards

Jim

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

Link to comment
Share on other sites

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

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