Jump to content
kymation

[Contribution] Products Specifications

Recommended Posts

The Alpha code is modular everything, including the comparisons. The old code uses code chunks in includes/modules but is not modular in the sense that osCommerce 2.3x uses.

 

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

The Alpha code is modular everything, including the comparisons. The old code uses code chunks in includes/modules but is not modular in the sense that osCommerce 2.3x uses.

 

Regards

Jim

I'm on a 2.3.4 engine, and have migrated some custom code from 2.2MS2 to the modular content mechanisms, but at this point it is still a mix.

The product specifications is one of the bigger areas that is old style right now ..


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

Hi all!!!

My compliments, this is a great contrib!
I installed it on osCommerce 2.3.4.
And faced with this problem in admin/categories.php. When saving product added \\r\\n. Kept putting solutions found on this forum, updated the editor CKEditor, even changed it to tinyMCE, but nothing helped. Only now \r\n. Maybe someone can suggest a solution to this problem.
Thank you!

 

Regards

Sergey!

Share this post


Link to post
Share on other sites

Hello!

I installed You contr on osc 2.3.4.

I have problem. 

In product_info.php page I can see index.php page content.

I tryed few times with Beyond Compare and I tryed simple copy files on vanilla shop. All the same.

I googled and searched in this forum, but can't find any solution.

You can see product info page here: http://vaciesuuznemums.lv/1a1a1a/product_info.php?products_id=16

 

 

Thanks

Share this post


Link to post
Share on other sites

Hello!

Im reading all this forum and stoped in this discussion:

http://forums.oscommerce.com/topic/344692-contribution-products-specifications/?p=1687740

and I have installed also Rows Module and if Im installing any Categories module I have error like this:

1054 - Unknown column 'categories_bottom_description' in 'field list'
select categories_bottom_description from categories_description where categories_id = '3' and language_id = '1' limit 1 
[TEP STOP]

 

or:

 

1054 - Unknown column 'p.products_sort_order' in 'order clause'
select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id join products_description pd on p.products_id = pd.products_id join products_to_categories p2c on p.products_id = p2c.products_id join categories c on p2c.categories_id = c.categories_id where c.categories_id = '10' and p.products_status = '1' and pd.language_id = '1' order by p.products_ordered desc, p.products_sort_order limit 3 
[TEP STOP]

 

 

How could I resolve it?

Share this post


Link to post
Share on other sites

Add this column to the categories_description table: categories_bottom_description, type text.

 

Add to the products table: products_sort_order, type int(11).

 

Or remove those columns from the SQL in the respective modules.

 

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, i have this addon version 1.1.11 installed.

 

is there any changes should i do to this addon if I upgrade from osc2.3 to 2.4 ?

Share this post


Link to post
Share on other sites

There is currently no osCommerce 2.4, so the question cannot be answered.

 

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

There should not be any major changes. There may be some locations where the updated osCommerce code affects something that this addon has already changed. If there are, you can post those changes here and I'll tell you what to do.

 

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

We're experiencing some strange problems with PS 1.1.11 on osC 2.3.4.: The admin PS tabs are not working properly, there is a line with tabs, but the tabs are empty, directly below the line of tabs, the admin page (with graphs) is "reloaded", and below that the content of the tabs is displayed in stock osC layout. The left column admin controls are not working anymore. Is there a problem with two tab-series in one page, one for the admin controls and one for PS? 

 

Same thing seems to happen in the front side.

Share this post


Link to post
Share on other sites

Yes, that's a common jQuery bug. Fortunately the fix is fairly easy.

 

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

Yep, when you found it... it's sometimes difficult to search for problems which are not clearly defined by error messages. What do you search for, "there's something wrong", lots of results, lots to read!

 

We've never been able to get the comparison part up and running, have two products, each with two specs with two values each, within the same category. Specs are showing up, filtering works, but no comparison link in product_listing or product_info to be found. Products are two deep (dvd movies - action).

 

Products Comparison Page Subhead
Minimum Spec Comparison 2
Show More True
Show Empty Products True
Comparison Link in Index True
Comparison Row in Table top
Show Comparison True
Comparison in Index False
Comparison Suffix in Header True
Comparison Box Style Simple
Spec Combo Manufacturer 0
Spec Combo Weight 0
Spec Combo Price 0
Spec Combo Model 1
Spec Combo Image 3
Spec Combo Name 2
Spec Combo Buy Now 4
 

The product_listing file in PS 1.1.11 is identical to stock osC, there seems to be nothing different. 

 

$current_category_id can be echoed.

 

Any suggestions?

Share this post


Link to post
Share on other sites

Set Minimum Spec Comparison to 0. Try different box styles. And check that you got the comparison button code pasted into the right spots (2) in index.php.

 

Regrds

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

Thanks for the pointers! The comparison bit in index.php seemed to be too far down, should be inside the if statement where product_listing is included I think, or maybe even in the product_listing module itself? The setting Comparison Row in Table can't do anything now I think, since the product_listing module in the download appears to be identical to the stock product_listing module.

 

Do I undertand correctly that a table is produced that shows the specs for all the products in a specific (sub)category? However, there are no identifiers in my table. Played around with the Spec Combos since I presume they do something with these identifiers so that you produce a sort of enhanced product listing? No success so far.

 

Did you ever consider to make some tick boxes in product listing, to directly compare two or three products on their specs? 

Share this post


Link to post
Share on other sites

Yes, it will show an enhanced Product Listing-style table with specification columns. Check that your category has the Display the products in this category: selection set to Detailed table mode (include Specification columns). That will only work if there are specifications associated with that category and they have the Show Comparison selector set to True.

 

I did write a "select to compare" module for this, but it's only in the Beta version I posted a few pages back. That version requires a lot of advanced features, such as Modular Categories, that are only now being incorporated into osCommerce. You're welcome to use that code, but you will need to do some hacking to make it work with stock osCommerce.

 

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 hesitating to ask, but will do it nevertheless: where can I find Display the products in this category: selection set to Detailed table mode (include Specification columns).

 

I will look into the select to compare code, after I get the basics up and running, sounds promising though!

Share this post


Link to post
Share on other sites

It should be in the Category setup menu. The exact text may be different, as I was referring to the Beta version. That's all I have installed to look at right now.

 

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

@@kymation

 

in products_info.php, you have

// Start Products Specifications
  if (SPECIFICATIONS_BOX_FRAME_STYLE == 'Tabs') {
    // Insert the javascript for the tabs
    $head_javascript = '  <script language="javascript" type="text/javascript">' . PHP_EOL;
    $head_javascript .= '    $(document).ready(function(){' . PHP_EOL;
    $head_javascript .= '      initTabs();' . PHP_EOL;
    $head_javascript .= '    });' . PHP_EOL;
    $head_javascript .= '    function initTabs() {' . PHP_EOL;
    $head_javascript .= "      $('#tabMenu a').bind('click',function(e) {" . PHP_EOL;
    $head_javascript .= '      e.preventDefault();' . PHP_EOL;
    $head_javascript .= '      var thref = $(this).attr("href").replace(/#/, "");' . PHP_EOL;
    $head_javascript .= "      $('#tabMenu a').removeClass('active');" . PHP_EOL;
    $head_javascript .= "      $(this).addClass('active');" . PHP_EOL;
    $head_javascript .= "      $('#tabContent div.content').removeClass('active');" . PHP_EOL;
    $head_javascript .= "      $('#'+thref).addClass('active');" . PHP_EOL;
    $head_javascript .= '      });' . PHP_EOL;
    $head_javascript .= '    }' . PHP_EOL;
    $head_javascript .= '  </script>' . PHP_EOL;
    $head_javascript .= '  <script src="ext/jquery/star_rating/jquery.rating.pack.js" type="text/javascript" language="javascript"></script>' . PHP_EOL;
    $head_javascript .= '  <link href="ext/jquery/star_rating/jquery.rating.css" type="text/css" rel="stylesheet"/>' . PHP_EOL;

    $oscTemplate->addBlock( $head_javascript, 'header_tags' );
  }

  require( DIR_WS_INCLUDES . 'template_top.php' );

this is resulting in the script appearing prior to the jquery, which then gives firebug error: ReferenceError: $ is not defined

 

source shows like this

<base href="http://www.xxmydomainxx.com/">
  <script language="javascript" type="text/javascript">
    $(document).ready(function(){
      initTabs();
    });
    function initTabs() {
      $('#tabMenu a').bind('click',function(e) {
      e.preventDefault();
      var thref = $(this).attr("href").replace(/#/, "");
      $('#tabMenu a').removeClass('active');
      $(this).addClass('active');
      $('#tabContent div.content').removeClass('active');
      $('#'+thref).addClass('active');
      });
    }
  </script>

<script type="text/javascript" src="ext/jquery/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.10.4.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/ui/blacktie-modblue/jquery-ui-1.10.4.min.css" />

How would I correct this properly on standard 2.3.4 if the javascript is only needed on the product_info page? 


-Dave

Share this post


Link to post
Share on other sites

The jQuery call needs to be above the code that calls the header tags. This is the way stock osCommerce is designed, so it's something you have changed. Theme switcher maybe?

 

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

@@kymation

 

yes - theme switcher. Sounds like you've seen this before? I've been trying to see where to re-order this but no luck.

Theme switcher has sort order of 1

 

template top is like this

<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
  <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
<?php
}
/*** End Header Tags SEO by oscommerce-solution.com ***/
?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<?php echo $oscTemplate -> getBlocks('header_tags'); ?>

<!-- meta tag is for IE only and will not validate unless you place it in conditional tags -->
 
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<![endif]-->

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">

	<!-- ****** favicons ****** -->
	<link rel="shortcut icon" href="/favicon.ico">
	<link rel="icon" sizes="16x16 32x32 64x64" href="/favicon.ico">
	<link rel="icon" type="image/png" sizes="196x196" href="/favicon-196.png">
	<link rel="icon" type="image/png" sizes="160x160" href="/favicon-160.png">
	<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png">
	<link rel="icon" type="image/png" sizes="64x64" href="/favicon-64.png">
	<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png">
	<link rel="apple-touch-icon" sizes="152x152" href="/favicon-152.png">
	<link rel="apple-touch-icon" sizes="144x144" href="/favicon-144.png">
	<link rel="apple-touch-icon" sizes="120x120" href="/favicon-120.png">
	<link rel="apple-touch-icon" sizes="114x114" href="/favicon-114.png">
	<link rel="apple-touch-icon" sizes="76x76" href="/favicon-76.png">
	<link rel="apple-touch-icon" sizes="72x72" href="/favicon-72.png">
	<link rel="apple-touch-icon" href="/favicon-57.png">
	<meta name="msapplication-TileColor" content="#FFFFFF">
	<meta name="msapplication-TileImage" content="/favicon-144.png">
	<meta name="msapplication-config" content="/browserconfig.xml">
	<!-- ****** favicons ****** -->

<!--[if (gt IE 8) | (IEMobile)]><!-->
  <link rel="stylesheet" href="css/responsive.min.css" />  <!-- this is the added framework -->
<!--<![endif]-->
<!--[if (lt IE 9) & (!IEMobile)]>
  <link rel="stylesheet" href="css/ie.css" />
<![endif]-->

<!-- default oscommerce scripts -->
<script type="text/javascript" src="ext/jquery/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="ext/photoset-grid/jquery.photoset-grid.min.js"></script>
<script type="text/javascript" src="ext/jquery/star_rating/jquery.rating.pack.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/star_rating/jquery.rating.css" />
<link rel="stylesheet" type="text/css" href="ext/colorbox/colorbox.css" />
<script type="text/javascript" src="ext/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="stylesheet.min.css">

<!-- add custom google font files if you want -->
<link href="//fonts.googleapis.com/css?family=Roboto:400,300,700" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">

<!--****** begin Scroll Box ******-->
<script type="text/javascript" src="ext/jquery/jquery.scrollbox.min.js"></script>
<!--****** end Scroll Box ******-->

<!-- repositioned the call for the html5.js - it should be below stylesheets and also below the call for the jquery -->
<!--[if lt IE 9]>
  <script src="js/html5.js"></script>
<![endif]-->

<?php
  if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
<script>  $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);</script>
<?php
}
?>
  <script type="text/javascript">
  // fix jQuery base tag bug
        $.fn.__tabs = $.fn.tabs;
        $.fn.tabs = function (a, b, c, d, e, f) {
          var base = location.href.replace(/#.*$/, '');
          $('ul>li>a[href^="#"]', this).each(function () {
                var href = $(this).attr('href');
                $(this).attr('href', base + href);
          });
          $(this).__tabs(a, b, c, d, e, f);
        };
  </script>
 
</head>

Thx for looking~


-Dave

Share this post


Link to post
Share on other sites

There's a lot going on in there. The easiest solution for that is a bit of a hack. First change the code in product_info.php from this:

    $oscTemplate->addBlock( $head_javascript, 'header_tags' );

to this:

    $oscTemplate->addBlock( $head_javascript, 'header_last' );

Then add this in template_top.php, just before the </head> tag:

<?php echo $oscTemplate->getBlocks('header_last'); ?>

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

×