Jump to content
kymation

[Contribution] Products Specifications

Recommended Posts

@@kymation

 

any chance you have the CSS for  class="inside_heading"

 

it's used quite a bit on the tabs page but I can't find it in the stylesheet. did I miss it?

 

this too

class=imageBox

 

seems I'm missing something?

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

For inside_heading I've used:

.inside_heading {  /* Heading inside the content box */
  font-size: 10pt;
  font-weight: bold;
  border-bottom: 1px dashed #999999;
  padding-top: 10pt;
  padding-bottom: 0;
}

For imageBox I’ve used:

.imageBox {
  width: 12.5em;
  height: 15.75em;
  padding: 5px;
  border: 1px solid #182d5c;
  margin: 3px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 8pt;
  background: #ffffff;
  float: left;
}

Of course you can use whatever you want that looks good to you.

 

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

 

Thank you sir - that sorted out the layout issues... just finishing up with adding x-sell and the activating the accessories tab.

One new issue... adding the two css bits above fixed the image layout, but borked the contentbox and I can't seem to sort it. See pic

tab_goofy.png

or at the site - click the Accessories tab.

 

Any idea where to look to that appreciated?

 

 


-Dave

Share this post


Link to post
Share on other sites

playing with firebug - if I disable   float: left;   The product falls back into the content box, but box structure is messed up.

With float left enabled, the product box is all pretty, but its outside/below the content box...

 

I'm stuck
 


-Dave

Share this post


Link to post
Share on other sites

This is a common problem with CSS. When the contents are floated, the container fails to contain them. Your tabs container is:

<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">

The ui-helper-clearfix class is supposed to fix that problem. It doesn't, or at least not in all browsers. I would try this:

.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
  content:"";
  display:table;
}
.ui-helper-clearfix:after {
  clear:both;
}
.ui-helper-clearfix {
  zoom:1; /* For IE 6/7 (trigger hasLayout) */
}

Part of that is already in the jQuery code, so you can experiment with how much of this is really needed.

 

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

 

Got it!  your pointer got me on track

 

in products_tabs.php

 

The fix was to add  class="ui-helper-clearfix" at the individual tab level, like this

<?php
// The Accessories/Cross Sell tab
  if ($acc_tab == true) {
//        echo '  <div id="tabs-8">' . "\n";
        echo '  <div id="tabs-8" class="ui-helper-clearfix">' . "\n";
        echo '    <div class="inside_heading">' . sprintf( TEXT_TAB_ACCESSORIES_HEAD, $product_info['products_name'] ) . '<span class="smallText"> [' . $product_info['products_model'] . ']</span></div>' . "\n";
        echo '    <br />' . "\n";
        include_once( DIR_WS_MODULES . 'products_accessories.php' );
        echo '  </div>' . "\n";
  }
?>

working great now! Thank you

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

Huh. That's supposed to fix the container, not the individual contents. CSS is weird.

 

Thanks for letting me know what works.

 

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 using product specification in my 2.3.4 store, but i'm interesting to migrate to 2.3.4 BS do you know if this add is possiblw to install in 2.3.4BS?

 

Thanks

Marco

Share this post


Link to post
Share on other sites

It's possible, but you'll have to tweak a few things to make them look good. It all depends on what parts of PS you want to use.

 

Of course you'll have to patch the existing files and not just drop the new ones on top.

 

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

Jim,

 

Trying to get the x-sell cache working...

 

for product_info,php

The xsell package has

FIND

<?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
   }
?>

REPLACE with this:

<?php
//added for cross -sell
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_xsell_products(3600); //added for Xsell
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); //added for Xsell
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
  }  // too many per mort?
?>

Since we've moved the display of the xsell item to the tab, if not overly complicated, would you know how to go about getting the cache entry working again? 

 

If its helpful, here is tep_cache_xsell_products

// Cache the also Xell module
  function tep_cache_xsell_products($auto_expire = false, $refresh = false) {
    global $_GET, $language, $languages_id;

    $cache_output = '';

    if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
      if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id'], $auto_expire)) {
        ob_start();
        include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
        $cache_output = ob_get_contents();
        ob_end_clean();
        write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id']);
      }
    }

    return $cache_output;
  }

Thank you for the assistance.

Edited by Roaddoctor

-Dave

Share this post


Link to post
Share on other sites

You should be able to just add the xsell part in the products_tabs.php. Let me try:

<?php
// The Accessories/Cross Sell tab
  if ($acc_tab == true) {
    echo '    <div id="tabs-8">' . "\n";
    echo '      <div class="inside_heading">' . sprintf( TEXT_TAB_ACCESSORIES_HEAD, $product_info['products_name'] ) . '<span class="smalltext">[' . $product_info['products_model'] . '<span></div>' . "\n";
    echo '      <br>' . "\n";

    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_xsell_products(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    }

    echo '    </div>' . "\n";
  }
?>

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

sweet. cache working now.

 

Using this maintains use of the Products Specification packages files for the items display

In /includes/modules/products_tabs.php

  if ($acc_tab == true) {
        echo '  <div id="tabs-8" class="ui-helper-clearfix">' . "\n";
        echo '    <div class="inside_heading">' . sprintf( TEXT_TAB_ACCESSORIES_HEAD, $product_info['products_name'] ) . '<span class="smallText"> [' . $product_info['products_model'] . ']</span></div>' . "\n";
        echo '    <br />' . "\n";

    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_xsell_products(3600);
    } else {
      include_once( DIR_WS_MODULES . 'products_accessories.php' );
    }

        echo '  </div>' . "\n";
  }

In /Includes/functions/cache.php

// Cache the also Xell module
  function tep_cache_xsell_products($auto_expire = false, $refresh = false) {
    global $_GET, $language, $languages_id;

    $cache_output = '';

    if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
      if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id'], $auto_expire)) {
        ob_start();
        include(DIR_WS_MODULES . 'products_accessories.php' ); 
        $cache_output = ob_get_contents();
        ob_end_clean();
        write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id']);
      }
    }

    return $cache_output;
  }

or to use the xsell file for the item display, use

// The Accessories/Cross Sell tab 
  if ($acc_tab == true) {
        echo '  <div id="tabs-8" class="ui-helper-clearfix">' . "\n";
        echo '    <div class="inside_heading">' . sprintf( TEXT_TAB_ACCESSORIES_HEAD, $product_info['products_name'] ) . '<span class="smallText"> [' . $product_info['products_model'] . ']</span></div>' . "\n";
        echo '    <br />' . "\n";

    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_xsell_products(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    }

        echo '  </div>' . "\n";
  }
// Cache the also Xell module
  function tep_cache_xsell_products($auto_expire = false, $refresh = false) {
    global $_GET, $language, $languages_id;

    $cache_output = '';

    if (isset($_GET['products_id']) && is_numeric($_GET['products_id'])) {
      if (($refresh == true) || !read_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id'], $auto_expire)) {
        ob_start();
        include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
        $cache_output = ob_get_contents();
        ob_end_clean();
        write_cache($cache_output, 'xsell_products-' . $language . '.cache' . $_GET['products_id']);
      }
    }

    return $cache_output;
  }

Thank you Jim


-Dave

Share this post


Link to post
Share on other sites

Thank you for posting the full code.

 

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

Good morning, i'm using Product specification in my Desktop store but i'd like to use also in my mobile store. The product filter is orizontal and i need to have it in vertical to use in mobile but i don't understand which file i need to modify. I tried with modules/product_filter but doesn't work

Can you help me?

 

Thanks

Marco

Share this post


Link to post
Share on other sites

There are two filter boxes: one in includes/modules/boxes that goes in the side columns, and one in includes/modules/ that goes in the page content. Which one are you trying to change, and which version of 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

hello,

i'll try change the filter in includes/modules/ that goes in page content, that at the moment is orizontal.

My oscommerce is 2.3.4

Share this post


Link to post
Share on other sites

Find these lines in includes/modules/products_filter.php:

        $box_text .= tep_get_filter_string ($specs_array['filter_display'], $filters_select_array, FILENAME_PRODUCTS_FILTERS, $var, $$var);
      } // if ($count_filters

    $info_box_contents[0][] = array ('text' => $box_text);

and change the last line of that code to:

    $info_box_contents[] = array ('text' => $box_text);

That should make it vertical.

 

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'm try to install product specification in a fresh install os OScommerce Bootstrap, it's working with few changes in Firefox (38.0.5) , Opera (30.0) but not in Internet Explorer (11.0), test site is at this address enoprova.altervista.org

 

Any help is appreciate

Marco

Share this post


Link to post
Share on other sites

Product Specifications was never designed for the Bootstrap osCommerce, so you will have to do some styling on that box. It looks like you have it set to the stock osC 2.2 style box. I would try setting your Admin >> Configuration >> Products Specifications >> Filters Box Frame Style to Simple or Plain and then add some CSS to style 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

Hello, I have a question.

 

I applied a filter named "Generation" to the category Processors (CPU)

 

The values are i3 / i5/ i7

 

When i go to the backend to edit a CPU product i can see the filter drop down with i3 selected by default.

 

is there a way to leave a product with Null value ? because not all processors belong to i3 or i5 or i7

Share this post


Link to post
Share on other sites

Hello, I have a question.

 

I applied a filter named "Generation" to the category Processors (CPU)

 

The values are i3 / i5/ i7

 

When i go to the backend to edit a CPU product i can see the filter drop down with i3 selected by default.

 

is there a way to leave a product with Null value ? because not all processors belong to i3 or i5 or i7

you have to define a "null" or "not applicable" value yourself and set it the lowest sort order


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

To the followers of this topic

 

On a related note, a real good recent article about best practices for ecommerce filters

http://baymard.com/blog/macys-filtering-experience

 

I just added some code on my test site to have a X link next to the selected filter to allow for easy removal, I think I'm gonna make my favorite list of links now all into checkboxes.

Read the article and you will 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

Hi @ll !

 

Does anybody figured out to automatically check other languaged checkboxes for eg. size or color ? 

 

I'll explain: I have three languages installed, and have to check every size or color specification three times 

(once for every language). Im searching a way to check the other languaged  checkboxes or radiobuttons 

when check one of them. Or maybe a "leader" language. Some javascript / jQuery ?

 

Please let me know !

 

Thanks !

 

Denzel.

post-332309-0-21107600-1438093397_thumb.jpg

Edited by Denzel

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

×