Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Development] Products Specifications


kymation

Recommended Posts

1. Bug. I'll take a look at that.

 

2. With any type of selection (other than text box) there is always a default selected. If you need to be able to save data without selecting a value, the N/A selection needs to be the default.

 

Regards

Jim

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

Link to comment
Share on other sites

2. I've seen an N/A in a dropdown, but it wasn't the default, could it be that it is sometimes added to the list (at the end ?)

 

I played a little with images and multi-images, havent figured it all out yet, but did notice that the filename, not the actual picture was showing on the comparison page.

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

All of the values are pulled from the database. The code adds N/A when it finds a blank (zero length) value.

 

Images were intended to be used only as filters. I don't see the point of using them in the Comparison or Product Info. If you have a need for that, it could be added.

 

Regards

Jim

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

Link to comment
Share on other sites

All of the values are pulled from the database. The code adds N/A when it finds a blank (zero length) value.

OK, that explains it...

 

Images were intended to be used only as filters. I don't see the point of using them in the Comparison or Product Info. If you have a need for that, it could be added.

For cookware, there are icons representing cooking gear suitable for use on gashobs, electric hobs, induction, oven etc.

That is my intended use, and I would use them on comparison and product info pages too.

I suppose for clothing it could be washing/ dry cleaning instructions etc, probably not that common but rather nice to have

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

Is it possible to show the Brand that is defined as a filter, and in the comparison page, to also show on the product_info specification ?

I have flagged this as such, but don't see it there.

Bug or WAD ? I'm not sure, you could argue both ways I guess since it wouldn't be to hard to actually just show a plain database field on that page too if you wish ...

 

Sorry for the loads of little messages, I just find it easier then to make a long list where it is much more difficult to keep track of responses and conversations ...

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 hadn't thought of the icons; that's a good use of images. I'll add the capability to show images on the Product Info and Comparison so you can use those. Instructions that are images of text would be better entered as text, for both the customers and the search engines.

 

The brand (manufacturer) should show up if all of the flags for Product Info are set. It's also subject to the minimum number of specifications. I'll test this out.

 

Regards

Jim

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

Link to comment
Share on other sites

Is it possible to show the Brand that is defined as a filter, and in the comparison page, to also show on the product_info specification ?

I have flagged this as such, but don't see it there.

Bug or WAD ? I'm not sure, you could argue both ways I guess since it wouldn't be to hard to actually just show a plain database field on that page too if you wish ...

 

Sorry for the loads of little messages, I just find it easier then to make a long list where it is much more difficult to keep track of responses and conversations ...

Sorry, I think I misunderstood this the first time. The original design did not include showing any of the existing columns on the Product Info page because they are already shown there. I forgot about the manufacturer; that's probably the one strange case. The Manufacturer's ID is retrieved from the database on the stock page and then never used. Odd.

 

I could add it to the specifications if you think it's really needed/useful. It's a special case, just like on the Comparison page, so it takes quite a bit of code. Well, if I only add the Manufacturer and not the other columns, maybe not that much code.

 

The alternative is to just fix the Product Info page code to show the manufacturer normally. I don't know why that isn't at least an option in the stock code. I added that to my codebase so long ago that I'd forgotten it wasn't stock.

 

The "loads of little messages" are no problem at all to me. It's probably easier for me to keep track as well. I just add things to the bug list as they're posted.

 

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

I agree with most of this. The filter box header is definitely a mistake. Added to the bug list, and thanks for the code for that.

 

The changes to Categories are an embarrassment to me. I've always felt that file was way too big and complicated -- and then I write an Admin file that's twice as bad. Yes, the changes should be moved to functions/classes and modules where possible. I do plan to do this. Probably should put it on the wish list.

 

The only thing I can't agree with is the popup. I absolutely loathe popups. They're a bad user interface design even when they work right. Besides, I'm using the Tabs interface, so a popup wouldn't work well at all. I will work on moving the code to a module though.

 

Thanks for all of the comments/bug reports and for the code.

 

Regards

Jim

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

Link to comment
Share on other sites

I agree with most of this. The filter box header is definitely a mistake. Added to the bug list, and thanks for the code for that.

 

The changes to Categories are an embarrassment to me. I've always felt that file was way too big and complicated -- and then I write an Admin file that's twice as bad. Yes, the changes should be moved to functions/classes and modules where possible. I do plan to do this. Probably should put it on the wish list.

 

The only thing I can't agree with is the popup. I absolutely loathe popups. They're a bad user interface design even when they work right. Besides, I'm using the Tabs interface, so a popup wouldn't work well at all. I will work on moving the code to a module though.

 

Thanks for all of the comments/bug reports and for the code.

 

Regards

Jim

 

Hello Jim, instead of popup same file can be used, in this case instead of popup, navigate to the actual file. Just add left column and any other missing include in the file. Plus one back button which will take you back to categories page with the product selected.

 

From Features Wish List:

76. Clicking the filter name in the breadcrumb removes it, which is the opposite of the normal behaviour for breadcrumb. Modify breadcrumb?

 

I think it works the way it should. If you check newegg.com, the filter is added to the breadcrumb with x to remove it. And thats why its put there in first place so you can easily remove any from the bunch and wider your results.

 

Small beautification to the crumbs. Will add tooltip to the breadcrumb filter

 

stylesheet..css

 

change

A.headerNavigation {

color: #FFFFFF;

}

 

to

 

A.headerNavigation {

color: #FFFFFF;

position: relative;

}

 

// add new styles

 

a span {

display: none;

}

 

a:hover span {

display: block;

position: absolute; top: 10px; left: 0;

/* formatting only styles */

padding: 5px; margin: 10px; z-index: 100;

background: #f0f0f0; border: 1px dotted #c0c0c0;

opacity: 0.9;

/* end formatting */

}

 

// products_filter.php

change

 

$breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'] . ' <span class="close">[X]</span>', tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ) );

 

To:

 

$breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'] . ' <sup>[X]</sup><span>Remove this filter.</span>', tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ) );

 

Adds nice tooltip with message 'Remove this filter' can be added to language file.

 

Thanks for great job. Have a nice weekend

Link to comment
Share on other sites

Thanks for the Tooltip code. I'll add that to the master.

 

Unfortunately, our filters in the breadcrumb trail do not act like Newegg's (or others who use this.) At newegg.com, clicking on the filter name leaves that filter applied while removing everything else after it. The last filter cannot be clicked. The [x] removes that filter and leaves the rest. In this code, clicking on either the filter name or the [x] removes that filter and leaves the rest. I'd like to fix that some day.

 

Thanks again for all of the help and suggestions, and have a great weekend.

 

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 Tooltip code. I'll add that to the master.

 

Unfortunately, our filters in the breadcrumb trail do not act like Newegg's (or others who use this.) At newegg.com, clicking on the filter name leaves that filter applied while removing everything else after it. The last filter cannot be clicked. The [x] removes that filter and leaves the rest. In this code, clicking on either the filter name or the [x] removes that filter and leaves the rest. I'd like to fix that some day.

 

Thanks again for all of the help and suggestions, and have a great weekend.

 

Regards

Jim

 

Hello Jim, well you where right about the filters. I did played around little bit with code and got it working and i am sure someone will improve on it. so here it goes.

 

First of all no need to add tooltip code, it will be handled by href title tag.

 

1) Modifications to includes/classes/breadcrumb.php

2 functions modified (function add) & (function trail)

 

function add($title, $link = '',$type='',$ntitle='') {
   // added type for filter type set, m for main link, l for main link, x for remove filter options 
   // added ntitle for displaying the title in the link
   // set in breadcrumb code of products_fitler.php
     $this->_trail[] = array('title' => $title, 'link' => $link,'type'=>$type,'ntitle'=>$ntitle);
   }

   function trail($separator = ' - ') {
    global $request_type;
     $trail_string = '';

     for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {
       if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {
        $src = $this->_trail[$i]['link'] ;
        if ($request_type == 'SSL') {

	        if(strcasecmp('https',substr($src,0,5)) != 0){
					$src = str_replace("http", "https",$src );	
				}
		}
	  if( $this->_trail[$i]['type'] == 'm'){ // main link diplay for breadcrumbs, will remove rest of the filters
		$trail_string .= '<a href="' . $src . '" class="headerNavigation" title="'.stripslashes($this->_trail[$i]['ntitle']).'">' . stripslashes($this->_trail[$i]['title']) . '</a>';
	  }elseif( $this->_trail[$i]['type'] == 'x'){ // display link for removing the selected filter
		$trail_string .= ' <sup>(<a href="' . $src . '" class="breadcrums_x" title="'.stripslashes($this->_trail[$i]['ntitle']).'">x</a>)</sup>';
	  }elseif( $this->_trail[$i]['type'] == 'l'){ // last main link in the filters, do not generate link
		$trail_string .= stripslashes($this->_trail[$i]['title']);
	  }else{ // default oscommerce link
			$trail_string .= '<a href="' . $src . '" class="headerNavigation">' . stripslashes($this->_trail[$i]['title']) . '</a>';
	  }
       } else {
         $trail_string .= $this->_trail[$i]['title'];
       }
        // increment the counter
	 // if link is for m (main) then do not add separator, separator will be added after x
	 // if link is for l (last main) then do not add separator, separator will be added after x
       if ((($i+1) < $n) && ($this->_trail[$i]['type'] != 'm') && ($this->_trail[$i]['type'] != 'l')) $trail_string .= $separator;
     }

     return $trail_string;
   }

 

 

2) Modifications to breadcrumb code in products_fitler.php

 

  // Add Filter to Breadcrumbs if selected
 if (SPECIFICATIONS_FILTER_BREADCRUMB == 'True') {
   $bcount = count($specs_array_breadcrumb);
$scount = 1;
   foreach ($specs_array_breadcrumb as $crumb) {
 $filter_link = '&f'.$crumb['specifications_id'].'='.$crumb['value'];
	if($scount < $bcount){
		// generate link for main
		$breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, 'cPath=' . $cPath . $filter_link ),'m','Remove other filters' );
	}else{
		// generate link for last main
		$breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, 'cPath=' . $cPath . $filter_link ),'l','Remove other filters' );
	}
  	// generate link for x
	$breadcrumb->add ($crumb['specification_name'] . ' : ' . $crumb['value'], tep_href_link (FILENAME_PRODUCTS_FILTERS, tep_get_all_get_params (array ('f' . $crumb['specifications_id']) ) ),'x','Remove filter: '.$crumb['specification_name'] );
  $scount++;
   }
 }

 

 

3) Added style in stylesheet.css for breadcrums_x

 

a.breadcrums_x:link, a.breadcrums_x:active, a.breadcrums_x:visited{ 
 font-size: 10px; 
 color: #FFFFFF;
 font-weight: bold;
 text-decoration: none;
 }
 a.breadcrums_x:hover{
 font-size: 10px;
 color: #17426B;
 }

 

 

This will mimic the newegg style of breadcrumbs.

Link to comment
Share on other sites

hi, trying out the images function.

 

I'm not sure if I messed up the installation of the admin, I don't think I did since it is in the products specifications section.

When I add an image filter value, the first time (upon insert) the image is not uploaded or at least not the value set.

When I next change the empty entry that has been created, I select the image again, and then it is uploaded and showing correctly.

 

Can you confirm this is also happenign on your system.

It only really is in the setup of the Filter Values, the regular setup of allowed values is working fine.

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

Here goes a bit more test results ...

 

Catalog side:

1) On the specifications tab, for images, the image filename is shown, not the actual image.

 

2A) When multi-image is selected, only the last saved images filename is shown

or on Admin side

2B) When multi-image is selected, only last selected image filename is saved

 

3) when multi-image is selected, when you edit product, the previously set values are blanked out - nothing shows as checked/saved, though the test on the catalog side indicates at least one value is saved.

 

 

I also have a showall image missing, but I think that is my bad ...

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

hi, trying out the images function.

 

I'm not sure if I messed up the installation of the admin, I don't think I did since it is in the products specifications section.

When I add an image filter value, the first time (upon insert) the image is not uploaded or at least not the value set.

When I next change the empty entry that has been created, I select the image again, and then it is uploaded and showing correctly.

 

Can you confirm this is also happenign on your system.

It only really is in the setup of the Filter Values, the regular setup of allowed values is working fine.

No, this is working. It uses the same upload code as stock osCommerce, so it should work if any other image upload is working. I have no idea why this would fail on the first upload and then work the second time.

 

Regards

Jim

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

Link to comment
Share on other sites

<code snipped>

This will mimic the newegg style of breadcrumbs.

Thanks for the Breadcrumbs code. I'll give it a try as soon as I get free from the mess I'm working on now.

 

Regards

Jim

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

Link to comment
Share on other sites

1) Fixed; will be in the next release.

 

2) I'll check this out. Probably a bug

 

3) Probably the same bug as #2. I'll check.

 

Thanks for the bug reports.

 

Regards

Jim

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

Link to comment
Share on other sites

1. Bug. I'll take a look at that.

 

2. With any type of selection (other than text box) there is always a default selected. If you need to be able to save data without selecting a value, the N/A selection needs to be the default.

 

Regards

Jim

 

Is there a way to have text box also have some default value. I have a product specification value that is same for all the products under a category. If we can make it default then I won't have to renter that value to all 80 products. Thanks for all your help.

Link to comment
Share on other sites

  • 2 weeks later...

Any ETA for the next release with the streamlined categories file and the above changes? I really like this mod and have been testing it on my test site. I think the next group of changes will make it a real winner!

Link to comment
Share on other sites

I'm currently in the middle of a major site revamp (Including adding this contribution.) Don't expect any major changes for a while. I'll try to get some bugfixes taken care of in the next week or so, but I don't have a lot of time right now.

 

Regards

Jim

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

Link to comment
Share on other sites

Hi Jim,

 

Thank you for your great contributions. After reading almost all replies, I'm not sure if your add-on suits our need. I'd like to select and add a number of icons to product. Those icons are some safety standard symbols as seen on, say consumer electronics and electronic parts.

 

Have been searching for suitable module but still couldn't find the right one. Please help. Thank you.

 

Regards,

Mr. Tsang

Edited by sctsang
Link to comment
Share on other sites

Products Specifications has the ability to use images as specifications, so that should work for you. It's overkill if you don't need to compare/filter by those images. If you only need the images on the product pages, one of the additional images addons (More Pics, etc.) would probably be easier for you to use.

 

Regards

Jim

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

Link to comment
Share on other sites

Products Specifications has the ability to use images as specifications, so that should work for you. It's overkill if you don't need to compare/filter by those images. If you only need the images on the product pages, one of the additional images addons (More Pics, etc.) would probably be easier for you to use.

 

Regards

Jim

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

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