Products Fields Groups
#21
Posted 29 January 2012, 18:00
It was actually the 1.1 I had problems with. 1.2 I got fine.
Thanks!!!!
Can't wait to try this tomorrow
#22
Posted 25 February 2012, 11:43
Just installed this great contribution (the original, update 1.1 and 1.2). It works great. Only it seems to switch the "Tab" input with the "L_sort" input. If I set the "L_sort" positions in the "Tab" column, it works perfect.
If I set the "Tab" positions in the "L_sort" column, it shows the information but not under the right Tab, just all listed under the first tab (The Tabs show ok). Tabs and information link back to the index-page,
This doesn't look right.
Is this a know problem or could it be caused by other installed addons?
What could I do to solve it?
Thanks for your help.
Gerhard
#23
Posted 26 February 2012, 09:53
there is no problem that i know of - the 3 sorting columns work independently from each other - meaning filling all 3 with sorts will show the complete extra fields in all 3 places - products - listings and tabs
the tabs query ( from 9 in update 1.2) is
//start Product Fields groups tabs $groups_tms_query = "select po.products_options_name , pfgv.products_fields_group_values from " . TABLE_PRODUCT_FIELDS_GROUPS_ATTRIBUTES . " pfga, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCT_FIELDS_GROUPS_VALUES . " pfgv where pfga.products_fields_group_id = '".(int)$product_info['products_fields_group_id']."' and po.products_options_id = pfga.products_options_id and pfga.products_options_id = pfgv.products_options_id and pfga.products_fields_group_id = pfgv.products_fields_group_id and po.language_id = '" . (int)$languages_id . "' and pfgv.language_id = '" . (int)$languages_id . "' and pfgv.products_id = '".$product_info['products_id']."' and pfga.products_fields_group_tms_sort_order > 0 order by pfga.products_fields_group_tms_sort_order";
this is pulling data only where there is tab sort set which is greater than 0 - the other sorting fields have no influence - they could also be set or not.
Not sure why you see everything in 1 tab - if you have 1 sort field set in TAB then you will only have 1 tab - but should contain only that specific field - not all.
Could you try to remove all sorts from P.sort and L.Sort and populate on 2-3 sorts in TAB and make sure these 2-3 fields do have populated data.
As for the Links i believe the links will look like this #tab-1 - clicking them without the default javascript will take you to index.
The generated html should look something like this
<div id="tabs"> <!---Generate the tabs--> <ul> <li><a href="#tabs-1" >Product details</a></li> <li><a href="#tabs-2" >Key features</a></li> <li><a href="#tabs-3" >Technical details</a></li> <li><a href="#tabs-4" >Memory</a></li> <li><a href="#tabs-5" >Model</a></li> <li><a href="#tabs-6" >Size</a></li> <li><a href="#tabs-7" >Version</a></li> </ul> <!--- End Generate the tabs--> <!---Generate the tab contents--> <div id="tabs-1">Introducingggggg the Millennium G400 Series - a dramatically different, high performance graphics experience. Armed with the industry's fastest graphics chip, the Millennium G400 Series takes explosive acceleration two steps further by adding unprecedented image quality, along with the most versatile display options for all your 3D, 2D and DVD applications. As the most powerful and innovative tools in your PC's arsenal, the Millennium G400 Series will not only change the way you see graphics, but will revolutionize the way you use your computer.</div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-2"><ul><li>New Matrox G400 256-bit DualBus graphics chip</li><li>Explosive 3D, 2D and DVD performance</li><li>DualHead Display</li><li>Superior DVD and TV output</li><li>3D Environment-Mapped Bump Mapping</li><li>Vibrant Color Quality rendering </li><li>UltraSharp DAC of up to 360 MHz</li><li>3D Rendering Array Processor</li><li>Support for 16 or 32 MB of memory</li></ul></div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-3"><ul><li>Exclusive 0dB thermal design dissipates heat efficiently without any noise</li> <li>LP Bracket bundled: HTPC ready design. Free Low profile bracket bundled </li> <li>EMI Shield Reduces 66% of electromagnetic interference for a stable signal, clearer screen display and a safer, healthier computing environment. </li></ul></div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-4">32MB</div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-5">Matrox G400</div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-6">not so big</div> <!---End Generate the tab contents--> <!---Generate the tab contents--> <div id="tabs-7">very old version</div> <!---End Generate the tab contents--> </div>
#24
Posted 26 February 2012, 09:59
<!--- start Product Fields groups tabs -->
<script type="text/javascript">
$(function(){
$('#tabs').tabs();
});
</script>
<!--- end Product Fields groups tabs -->
ive replace in preparation with
<!--- start Product Fields groups tabs -->
<script type="text/javascript">
$(function(){
// Tabs
$( "#tabs" ).tabs({
fx: { opacity:'toggle', duration:'normal' },
ajaxOptions: {
error: function( xhr, status, index, anchor ) {
$( anchor.hash ).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
}
}
});
$('#tabs ul li a').click(function () {location.hash = $(this).attr('href');});
});
</script>
<!--- end Product Fields groups tabs -->
to preload the tab from the url - the animation - and to allow ajax ( still to do on my end mostly taken from jquerys demo page) .
But this doesnt effect your problem.
Edited by thejudge99, 26 February 2012, 10:00.
#25
Posted 26 February 2012, 11:22
this same page ive added a backend screenshot - with a small description to the sort columns to show how ive set those up - maybe it helps.
Jules
#26
Posted 29 February 2012, 04:27
I'm not sure if this is the addon I need, so I will explain my problem and maybe someone can come up with an answer...
My OSCommerce site is racingpiping.com, and I am having products uploaded to it. I'm noticing that some categories have hundreds of products (and I have yet to find how they are sorted) which makes it hard to find what you're looking for. The person is adding every single product as a unique product, when actually, in have products of identical attributes that i'd like to have regrouped; example:
Silicone couplers come in lenght, color, diameter, with Master products being straight/45/90/reducer/90-reducer.
I'd like the "straight couplers" to show as the master product name. Once that master product is selected, a list of attributes is showed, one selection per attribute must be made:
Option 1: lenght with choices between 3" and 36" inch for that specific master product
option 2: diameter (1 / 1.5 / 2 / 2.25" / 2.5" / etc)
Option 3: Color
Quantity:
Add to cart
What would be added to the cat would be the unique item number of that given combination of attributes.
What are your thoughts?
Thanks,
Frank
#27
Posted 29 February 2012, 10:11
this addon doesnt effect the attributes part and how they currently work - what it does is make an extra use of them to create extra fields.
You could in theory use this to create unique groups for each unique combination - not sure how many you have .
eg.
lets say you want to group colours ( assuming for example you have the colors red + black).
you could create groups called
group_red - would contain length , diameter , color
group_black - would contain again length , diameter , color.
Attaching all products that are red to group_red
Attaching all that are black to group_black.
Now attach color to the Listing sort for each group.
And your product listings will be grouped together by color - showing the color in the listing.
Lets say instead with Length
Group_length3-6 would contain again length , diameter , color.
Group_length9-12 would contain again length , diameter , color.
attach all products that have length 3-6 inches to Group_length3-6
attach all products that have length 9-12 inches to Group_length9-12
attach length for both these groups to the L.sort - and voila the listings are grouped by length showing length in the listing view.
This can be further customized how you see fit
Edited by thejudge99, 29 February 2012, 10:17.
#28
Posted 02 March 2012, 15:59
Working demo can be found here ( stil a few kinks to sort out)
http://ocraw.conzept.de/theres-something-about-mary-p-19.html
#29
Posted 07 March 2012, 14:43
http://addons.oscommerce.com/info/8247
as well as the reviews integration - it also allows batch group changes @ Admin (Categories / Products).
Jules
#30
Posted 08 March 2012, 09:13
great contrib!
Is it possible to have one tab more, who shows product related documents for download? that will be very nice.
LaChrize
#31
Posted 08 March 2012, 15:56
in catalog/product_info.php
<!---Generate the tabs-->
<ul>
<?
while($results_tms_count_query = tep_db_fetch_array($groups_tms_count_query)){ ?>
<li><a href="#tabs-<? echo $tms_count; ?>" ><? echo $results_tms_count_query['products_options_name']?></a></li> <?
$tms_count++;
}
?>
<li><a href="/product_reviews_pfg.php?Tc=<? echo (int)$groups_tms_count?>&products_id=<? echo (int)$HTTP_GET_VARS['products_id']?>" title="<? echo IMAGE_BUTTON_REVIEWS ;?>" ><? echo IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : '') ;?></a></li>
</ul>
<!--- End Generate the tabs-->
and after this line of code
<li><a href="/product_reviews_pfg.php?Tc=<? echo (int)$groups_tms_count?>&products_id=<? echo (int)$HTTP_GET_VARS['products_id']?>" title="<? echo IMAGE_BUTTON_REVIEWS ;?>" ><? echo IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : '') ;?></a></li>
you could insert another <li></li> containing the the link to the new content. ie
<li><a href="/custom_content.php" title="my new content" >TAB_NAME</a></li>
This would automatically load custom_content.php via ajax when the tab is clicked.
or if you want the content already on the page embedded - so google has its contents to scan without following links.
<li><a href="#my-new-content" >TAB_NAME</a></li>
then after
<div id="<? echo IMAGE_BUTTON_REVIEWS ;?>"></div>
insert
<div id="my-new-content">here is my content that i want to show in my new tab</div>
Jules
Edited by thejudge99, 08 March 2012, 16:01.
#32
Posted 09 March 2012, 08:18
i gonna try that.
LaChrize
#33
Posted 09 March 2012, 13:03
BACKUP your products database before running
update products set products_fields_group_id = 0 where products_fields_group_id is NULL; ALTER TABLE products CHANGE products_fields_group_id products_fields_group_id INT( 11)NULL DEFAULT'0';
it basically replaces all groups set as NULL to 0
Jules
Edited by thejudge99, 09 March 2012, 13:04.
#34
Posted 06 April 2012, 15:40
Your screen shots look just what I need! I am 90% done, but hit a glitch. No idea if you can help or if I am busted ...
I have a template installed and the 16th Step in 1.00 release I cannot do as the produst listing module has been completely re-written by the template. The new (additional) file is a product listing with the template prefix. I am not going to ask you to look at it, that would be unfair, but can you tell me if the steps in 16 are 100% essential or not?
What I will do over the weekend is try a fresh install, add in your code changes and then add the template (so the other way around to what I have so far) ... worth a try.
Will keep you posted. If you can advise on 16 and 14b (that code also missing, athough the fragment still fitted in to what was missing).
Cheers.
John.
#35
Posted 06 April 2012, 15:41
#36
Posted 07 April 2012, 11:21
The product listing changes ( 16) are not needed , but i it could be that any SQL modifications done ( search , manufacturer listing etc) might also need to be left out - i cannot say right this second if that is the case.
The additions to product_info.php (14) are pretty flexible - the tabs - the extra fields. These can be placed pretty much anywhere - the wrapping HTML can also easily be changed to fit whatever layout you use.
Jules
#37
Posted 07 April 2012, 13:47
Jules
#38
Posted 09 April 2012, 14:42
Sorry, I haven't replied to your last answer, did some other thing in between. Thanks for your reply, the error appeared to be a left out closing </a> in this line <li><a href="#tabs-1" >Product details</a></li> (source view).
Everything is working fine now except for one thing.
The tab "Reviews" shows the number of reviews in the tab (Reviews (3) but doesn't show the reviews. It shows the messages "Error loading content".
Any idea why the content isn't loaded?
Your help is much appreciated.
Thanks
Gerhard
Edited by srirahandcraft, 09 April 2012, 14:53.
#39
Posted 10 April 2012, 07:20
Look at your own source code - the reviews tab should look something like this
<li><a href="/product_reviews_pfg.php?Tc=3&products_id=19" title="Reviews" >Reviews (14)</a></li>
where /product_reviews_pfg.php?Tc=3&products_id=19 is being loaded by ajax - what you can then try is
www.MYDOMAIN.COM/product_reviews_pfg.php?Tc=3&products_id=19 which should show nothing else but the 1st page of reviews ( Tc= the no of tabs minus reviews.) the url at the end should be what you see in your own source.
If you get a 404 error then make sure you have uploaded product_reviews_pfg.php
my test site looks like this
http://ocraw.conzept.de/product_reviews_pfg.php?Tc=3&products_id=19 ( <- click)
Jules
Edited by thejudge99, 10 April 2012, 07:30.
#40
Posted 10 April 2012, 08:13
Thanks for the help.
Problem solved, I just had to take out the slash before "product_reviews_pfg.php.
It's working now.
Regards,
gerhard














