Jump to content
kymation

[Development] Products Specifications

Recommended Posts

when you specify values on the products page, and you are only allowed to select from pre-defined values, it should be presented language independent and could be stored in the same table products_specifications with a language_id of 0, and the specification_values_id stored in the specification field.

 

evidently, this is just my limited view on things, it is quite a complex system, not sure if it can be solved that easily or would break the system logic completely in other places ...

 

i wondered looking at the database that the actual values are stored and not a reference to the specification_values, which if I understand well that if you have setup pre-defined lists, you can not alter values (e.g. correct typos) once you have them assigned to products, or not ?


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

Share this post


Link to post
Share on other sites
when you specify values on the products page, and you are only allowed to select from pre-defined values, it should be presented language independent and could be stored in the same table products_specifications with a language_id of 0, and the specification_values_id stored in the specification field.

What do you do when the value is a word or words, and needs to be in the appropriate language?

 

evidently, this is just my limited view on things, it is quite a complex system, not sure if it can be solved that easily or would break the system logic completely in other places ...

It would break a lot of things. We select by language the same way the rest of osCommerce does. Changing this would be a major departure from the osC design.

 

i wondered looking at the database that the actual values are stored and not a reference to the specification_values, which if I understand well that if you have setup pre-defined lists, you can not alter values (e.g. correct typos) once you have them assigned to products, or not ?

True. Make certain that your pre-defined values are correct first. If you make a mistake, you would need to delete that value from all products that use it before changing the Specification Value. There's probably a way to automate this. I'll add it to the Wish List.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi Jim,

I'm really digging this mod! I am in the process of tweaking it but have a few questions as I am not a programmer.

First, how can I move the tabbed box downward on my product_info page? I have tried adding a invisible line but it kicks everything to the right side.

Second, is the products_information.php file supposed to be a duplicate of product_info.php? If so can I transfer my mods for Additional Images and seo header tags to that file?

Thanks again for this great solution.

Matt


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Your invisible spacer should work, but yo need to put a break after the spacer. Or you could enclose both in a table and put them on separate rows. The tab box needs to be separated from everything else or it will interfere.

 

Yes, products_information.php is an alternate Product Info page. It was designed to look like osCommerce 3.0a5. Feel free to use it, modify it, or design your own. I just thought it looked good with the tabbed interface and wanted to give everyone some ideas about what could be done with it.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites
What do you do when the value is a word or words, and needs to be in the appropriate language?

You would need to join on products_specifications.specification = specification_values_id and retrieve the appropriate localized value from that table.

That is exactly the point that I'm making.

 

It would break a lot of things. We select by language the same way the rest of osCommerce does. Changing this would be a major departure from the osC design.
I think we have a misunderstanding, you would still select on language, but you'd have to get the text from another table

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

Share this post


Link to post
Share on other sites
You would need to join on products_specifications.specification = specification_values_id and retrieve the appropriate localized value from that table.

That is exactly the point that I'm making.

How would you know that needs to be done? That is, how do you know that the value is localized by language or not?

 

I think we have a misunderstanding, you would still select on language, but you'd have to get the text from another table

How do you know what language to retrieve if you don't know the language?

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Me again

I have tried to put a separator everywhere imaginable and can not get the tabbed product description box to move. If I put one above <?php

// Products Specifications

include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS);

?>

It shoves everything to the right side of the page. Anywhere else and there is no difference.

The code im using as a spacer is <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

Can you shed some light?


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

That won't work because the tab box is not in a table cell. Try this:

<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?><br>

Regards

Jim


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

Share this post


Link to post
Share on other sites

That was it!!!!!!

I put that just before

<?php

// Products Specifications

include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS);

?>

So anyone using additional images mod with this one should do the same.

Thanks Jim Have a good weekend!


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

I've uploaded Version 0.9rc4 to the official site and to my site. This fixes a couple of bugs related to checkboxes in the Admin products menu. I've also removed the N/A entry as it is no longer needed. It was a bad idea to start with, and never worked.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites
How would you know that needs to be done? That is, how do you know that the value is localized by language or not?

 

 

How do you know what language to retrieve if you don't know the language?

 

Regards

Jim

I was thinking of the dummy/pseudo language being 0, better would be NULL, but I guess that is not an option in the database ?


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

Share this post


Link to post
Share on other sites
I was thinking of the dummy/pseudo language being 0, better would be NULL, but I guess that is not an option in the database ?

Neither is an option -- the database will not accept an index of 0. This would have to be translated in the PHP code. And that still doesn't answer my questions.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I'm gonna have a closer look at the code, somehow I think there is a misunderstanding, if I can see the solution in the code, and show you this, I think we'll be talking the same language, making things much easier to understand :)


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

Share this post


Link to post
Share on other sites

Small bug in the admin product preview. The image for the spec bar is calling for corner_left and corner_left_right,gifs from admin/images/infobox/ But that folder doesn't exist. I just created the folder infobox and added the gifs.


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Good catch! I completely forgot about those images. I'll add them to my master copy. Thanks for the bug report.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hello evrybody!

I have a strange problem with this great contrib!

i tried to installed PS on a new installe of osc and i have this error message in

 

admin/categories :

 

1146 - Table 'event.specifications' doesn't exist

select sd.specifications_id, sd.specification_name, sd.specification_description, s.enter_values from specifications s, specification_description sd, specification_groups_to_categories sg2c where sd.specifications_id = s.specifications_id and sg2c.specification_group_id = s.specification_group_id and sg2c.categories_id = '4' and language_id = '4' and s.products_column_name = '' order by sd.specification_name 

 

and this on catalog/index.php

 

1146 - Table 'event.specification_groups' doesn't exist

select distinct p2c.products_id from products_to_categories p2c, specification_groups sg, specification_groups_to_categories sg2c where sg.show_comparison = 'True' and sg.specification_group_id = sg2c.specification_group_id and p2c.categories_id = sg2c.categories_id and sg2c.categories_id = '16' 

 

PS: i have already installed a patch for oscommerce to upgrad it for mysql 5.0

 

Please help!!! (and sorry for my poor english!)

Share this post


Link to post
Share on other sites

I verified my phpMyadmin it's ok

I verified my databse_table.php and it's ok

 

just one annother question why it add "event" (database name) to the table :

 

example : 1146 - Table 'event.specifications' doesn't exist... ? is this normal?

Share this post


Link to post
Share on other sites

1. Read Section 2.3 in the User's Manual.

 

2. The event part is the name of your database.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I'm Back!

Further testing of this mod on my site has been great with one new bug noticed. Once the code is added to product_info.php the add to cart button and the wishlist button no longer function. But, if you click on the ask a question tab and click continue it adds the product to the cart.

 

Also, when viewing a product in the admin panel the tabs are listed like TEXT_SPECIFICATIONS, TEXT_PRODUCT _INFO. Is there a mod missing for the admin/includes/language/english files?

 

Lastly, is there a way to expand and contract the product filter box in the left column. Right now it shows all the filters and is pretty long. I had to shut it off.


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

1. The original Product Info page submits to the cart using a form. The stock file has the form enclosing the entire page. This won't work with the Ask a Question tab that also uses a form. The solution is to move the Cart form so that it does not include the tabs section of the page. I did this in the product_information.php, but it looks like I forgot the change in the product_info.php. Oops. I'll fix this in the master. For now, you can use product_information.php as a guide to where the form needs to be.

 

2. catalog/admin/includes/languages/english/products_specifications.php, which is in my distribution. It may not be in the other languages though. I need to work on those.

 

3. Only by limiting the filters that apply to the current page. The center-page module may work better if you have a lot of filters. I would only use one in any case. Otherwise, it would need a new database column to turn filters on and off in that box, and that would turn them off everywhere. Hmm -- not very good. Suggestions?

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi jim,

 

Just a quick one ...

On the Manufacturers data displayed, possibly for all checkbox listings. If you decide to hide non-appliable ones (i.e. change the default greyed out option to 'none'), it creates an empty row I think, which causes additional whitespace and the remainder of the filter columns to be centered vertically much lower on the page. (both in the column left, as in the center column)

 

Also, for this one, I don't see the Show All label (though by default the box is checked) where as I do see it for radiobuttons e.g. with price ranges.

Edited by bruyndoncx

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

Share this post


Link to post
Share on other sites

The first is a formatting error. I'll add that to the bug list; should be easy to fix.

 

I have no idea what happened to the Show All. That used to work. Another bug for the list.

 

Thanks for the bug reports.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I've uploaded Version 0.9rc5 to the official site and to my site. This fixes all known bugs:

1. Add to Cart did not work correctly on the Product Info page when Tabs were used. This was due to overlapping forms on that page. The current version moves the cart submit form, necessitating some reformatting of the page. If you have other mods to this page, make certain that your forms do not overlap.

2. Formatting errors when using checkboxes or radio buttons with filters and Filter No Result set to None.

3. The Show All selection would disappear sometimes. This was due to not providing the correct count for this selection.

 

Please post here if you find anything wrong with these fixes, or any other bugs at all. The current bug list is in the distribution and here.

 

If all goes well, the first release of Version 1.0 will be on 09/09/2009. If all does not go well, I may just cheat and claim I did anyway.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×