Jump to content
kymation

[Contribution] Products Specifications

Recommended Posts

Thank you Jim, for helping with the cross-sell tab problem. I took the tab out of products_tabs.php and it works great!

 

BTW, you show Price Updater as working with version 2.2x. What problems, if any, can I expect installing it with version 2.3.1?

Share this post


Link to post
Share on other sites

It needs minor updates to add template_top.php etc. This one should work for the main file. The rest of the files from the 2.2x distribution should work, except the link from the Catalog box will have to be modified.

 

Regards

Jim

 

Edit: Wrong box.

Edited by kymation

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 had installed this addon on brandnew 2.3.1 and it works. Then I tried to installed with my current shop also with 2.3.1 version.

In the product_info.php page, there are also four others addons that demand code modify, they are

 

Child Attributes (fnzb)

Products Fields Groups

Sitemap SEO

QTPro Featured

 

In the admin site, it works find, but when I modified the prodcut_info.php,

I then got this error message, and also the bxgallery doesn't work as usual.

(the bxGallery will appear the main on the top and then another bxGallery with thumbnails below, and the error message right next to it.)

 

Warning: Invalid argument supplied for foreach()

in /includes/functions/html_output.php on line 379

 

Is there a way to fix this error?

 

thanks

 

Lyn

Share this post


Link to post
Share on other sites

Hi Jim,

 

I just tried to modified the product_info.php again, this time use your product_info.php to add other addons one by one and test,

I found that the problem cause the foreach() is the code for product option between Child Attributes and Products Specifications.

 

This is the code for Child Attributes as below:

 <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p>
<p>
<?php
$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
$products_options_array = array();
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
while ($products_options = tep_db_fetch_array($products_options_query)) {
$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
if ($products_options['options_values_price'] != '0') {
$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
}
}
if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
} else {
$selected_attribute = false;
}
?>
<!--
<strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="id_' . $products_options_name['products_options_id'] . '"'); ?><br />
//-->
<?php
//====================================================================================
// BOE Child Attributes (fnzb) 

 

Can I please ask your help and see how it can work with your Products Spcieifications?

 

Thank you very much in advance.

 

Lyn

Share this post


Link to post
Share on other sites

sorry, just found that I did not copy the code for Child Attributes completely.

 

 <!--
<strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="id_' . $products_options_name['products_options_id'] . '"'); ?><br />
//-->
<?php
//====================================================================================
// BOE Child Attributes (fnzb)
echo '<strong>' . $products_options_name['products_options_name'] . ':</strong><br />' . tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="id_' . $products_options_name['products_options_id'] . '"');
echo '<div id="child_' . $products_options_name['products_options_id'] . '"></div><br/>';
?>
<script type="text/javascript">
$( "#<?php echo 'id_' . $products_options_name['products_options_id']?>" ).change(function() {loadChildOptions('<?php echo $HTTP_GET_VARS['products_id']?>','<?php echo $products_options_name['products_options_id']?>',this.value);});
$( "#<?php echo 'id_' . $products_options_name['products_options_id']?>" ).trigger('change');
</script>
<?php
// EOE Child Attributes (fnzb)
//====================================================================================
}
?>
</p>

 

thanks

 

Lyn

Share this post


Link to post
Share on other sites

You'll have to combine the code for the two Addons. Products Specifications doesn't modify the code for the attributes; it just moves it. You'll need to find where the code was moved and make the changes for Child Attributes there.

 

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,

 

Thanks I end up delete the last part of Child Attributes code as I have no idea about PHP code and how to combine them.

 

It seems ok so far and I have a further question.

 

Configuration / Products Specification, I set Show Question Tab and Show Friend Tab as true, and it did show up on the front end product_info.php page, but when I click on either of them, it just jump to the product list page (I mean index, New Products For month page).

 

Does it mean that I can not use these two tab or some setting I need to modify? Many thanks in advance.

 

Lyn

Share this post


Link to post
Share on other sites

There's something wrong with the Javascript on your page. Use View Source in Firefox and click on each of the JS file links in the top section. If you find one that gives a 404 Not Found page, that one's broken and needs to be fixed.

 

It's also possible that you removed the tabs Javascript from the page. Again using View Source, find the following:

 

  <script type="text/javascript">
   $(function() {
  $( "#tabs" ).tabs({ selected: 0 });
  return false;
   });
 </script>

 

If it's missing, put it back just before the tabs start.

 

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

set the two tab false and then true again, now it works, just in IE the layout changed completely.

 

product_images_2.gif

product_images_1.gif

product_images_3.gif

 

 

???

 

Thanks

 

Lyn

Share this post


Link to post
Share on other sites

any screenshots or anything to view what this looks like? i looked inthe contribution file and there's nothing in there.

 

also, does this create tabs for the product info page? and are these tabs reliant on javascript for their layout? ie, if javascript is turned off, the layout goes messy?

 

thanks

Share this post


Link to post
Share on other sites

There are too many options, so even a representative sample would require dozens of screenshots. Feel free to make some for us if you want.

 

The default does use tabs on the product info page, although there is an option to just include the specifications inline if you want. The tabs are created and styled using your site's theme. That theme is jQuery, so yes it is dependent on Javascript. So is the rest of your site.

 

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

No, they would conflict.

 

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

ok great thanks

 

for what i need, could you advise me?

 

basically, all i am wanting on my 2.3.2 site is a product info page like this

 

http://www.style369.com/webapp/wcs/stores/servlet/ProductDisplay?beginIndex=1&viewAllFlag=&catalogId=33555&storeId=13054&productId=6204507&langId=-1&sort_field=Relevance&categoryId=289054&parent_categoryId=289043&pageSize=20

 

so it will have 3 tabs, i don't think i would need many specifications, but it might come in handy in the future

 

what do you think is best for what i am needing?

 

mainly the tab feature is what i am after.

 

i know that in attributes i could set size and colours if needed. Just wondering if this specifications might prove useful later on.

Share this post


Link to post
Share on other sites

Items like material, style, length, and care instructions could be specifications. Anything that you would normally put in bullet points is a candidate for a specification. Then you can filter on whichever specifications you want, so your customers can find what they are looking for easier. It all depends on what you want and what features you think your customers will find useful.

 

I would use Products Specifications for this, but there are other ways you could go.

 

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 had installed the PDF datasheet in osc 2.3.1 without anyother addon and it works.

I also installed the Products Specifications in osc 2.3.1, at the beginning it works, but somehow all a sudden I got the error message on Description Tab area:

 

Parse error: syntax error, unexpected T_STRING in //includes/functions/clean_code.php(162) : eval()'d code on line 1

 

and If I set Ask a Question or Tell a Friend to true, it then show then horizontally underneath the description area, not the tab. However the Reviews has no this problem at all.

 

I had read your

http://forums.oscommerce.com/topic/344692-contribution-products-specifications/page__st__160

 

each product orginal from osc 2.3.2 that i didnt touch at all, have no idea why it was fine at the beginning and then suddenly something wrong with "single quotes/apostrophes"

 

Now another problem I had is I put Product Specification and PDF together.

The new error is that when you click on the pdf link underneath the description tab, it show you

 

Fatal error: Call to undefined function tep_session_save_path() in /includes/languages/english.php on line 328

 

I had check the english.php and that is from Products Specification.

 

I google and found this:

http://forums.oscommerce.com/topic/348447-call-to-underfined-function-tep-session-save-path/

 

 

Can you please help? really confused now!!!

 

Thanks!

 

Lyn

Share this post


Link to post
Share on other sites

Items like material, style, length, and care instructions could be specifications. Anything that you would normally put in bullet points is a candidate for a specification. Then you can filter on whichever specifications you want, so your customers can find what they are looking for easier. It all depends on what you want and what features you think your customers will find useful.

 

I would use Products Specifications for this, but there are other ways you could go.

 

Regards

Jim

 

thanks Jim,

 

so once installed, is there like a box for left column which allows you to filter through certain specifications?

 

kind of like on that style website, it has like filters for categories, styles, etc, similar to that truffle shuffle website.

 

this is the kind of thing i would like.

Share this post


Link to post
Share on other sites

Yes, there is a filters box that can be used in either column. It's optional, like most of the other features. I have an updated version that Gary Burton contributed, so let me know if you want that.

 

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

@@ce7

Your first problem is unescaped apostrophes/single quotes in the description text. Fix those by adding backslashes.

 

tep_session_save_path() is defined in includes/functions/sessions.php. Check that you have not deleted the function.

 

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

 

Had check the session.php you mentioned, found this code:

 function tep_session_save_path($path = '') {
if (!empty($path)) {
return session_save_path($path);
} else {
return session_save_path();
}
}

 

I did not modify any code about session. I just installed CKEditor, your PDF Datasheet, and Products Specifications.

What should I do now?

 

http://postimage.org/image/ve74l847z/

 

Thanks

 

Lyn

Share this post


Link to post
Share on other sites

You still haven't fixed the first problem you mentioned. Do that first, since it might affect the other problem.

 

There is a fix for a session bug in osCommerce 2.3.3 that changes the above code. I would apply that first and see if it helps.

 

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,

 

The first problem, I went to the catalog/products and open the products, didn't do anything just save and refresh, the error disappear and description comes normally. The 2nd problem was still there after I make sure the first problem gone.

 

I had google and some said its typo problem; some suggest the configuration/session. I am not sure these information is for this case.

 

BTW, I had installed this both in 2.3.2 and 2.3.3 version (both has your PDF datasheet and Products Specifications and CKEditor), it had the same problem. Both 2.3.2 and 2.3.3 I had problem with Ask a Question question Tab and Tell a Friend Tab as image link showed last post.

 

Sorry I am a newbie, work home mum with two toddlars, don't have much time yet to get familiar with PHP code, so asked a lot of questions here.

 

Thank you for your time and help.

 

Lyn

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

×