Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-06-2007 19:30:19

StephenSlater
Member
Registered: 10-11-2007
Posts: 14

Multiple Pages Per Product?

Hello,

I've read some older post regarding this feature and several posts that suggest other people have actually achieved it...

What I'd like to do is have four 'pages' for one product.  For instance, I would like to have an overview page (which I can achieve by default), a features page, a specifications page and finally a warranty page.  All of this would need to be administered through the products section of the control panel.

Does anyone know of a way to handle this?  Is there a module?  Or is this something I can achieve through custom development?  If custom, where can I find a list of reliable developers willing to extend CCP?

Thanks for any assistance you can provide!

Stephen

Offline

 

#2 11-06-2007 21:54:19

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

Take a look at this site which will let you set up tabed pages in ccp,  http://www.barelyfitz.com/projects/tabber . It is not that hard to do and if you need help I have it setup on my site.

John

Offline

 

#3 11-06-2007 22:00:06

StephenSlater
Member
Registered: 10-11-2007
Posts: 14

Re: Multiple Pages Per Product?

Hi John and thanks for your reply.

I am familiar with tabber and various other tabbed scripts.  Could you briefly describe how you have it set up on your site?  Do you paste all of the HTML code necessary for the tabs in your product's description area?

Thanks.

Offline

 

#4 11-06-2007 22:25:28

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

Well it goes like this I downloaded the tabber script and placed it in my public/khxc/skins/{skin_in_use}/scripts file, then I place the defaut css for the tabber script into my all.css for the skin I am useing.

Then  I went to Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View and added this code to the three product detail desplays (after the call for the proddesc):

Code:

<?php print $proddesc; ?>

<?php

//+---
//| Set up the call for the tabber display.
//+---

print '<script type="text/javascript" src="skins/{name_of_your_skin}/scripts/tabber.js"></script>' . $eol

?>

Once that is done then all you have to do is enclose your products description which is in the Long Product Description* field in a division like:

Code:

<div class="tabber"><div class="tabbertab" title="name_1"> info here </div><div class="tabbertab" title="name_2"> more info </div></div>

This would give you two tabes in the long discription, name_1 and name_2 , and if java is disabled then it would just print as a standard discription.

John

Last edited by dh783 (02-20-2008 12:25:53)

Offline

 

#5 02-20-2008 10:22:59

trev77
Member
Registered: 02-13-2008
Posts: 28

Re: Multiple Pages Per Product?

Hi John,

Wonder if you can help. I cant seem to get the above working.
I have downloaded tabber.js, opened the file, selected everything and pasted that into my zipskin\scripts.js right at the bottom of the file.
I then downloaded example.css and done the same thing to the all.css.

I then added your above code to my custom file as below.


Code:

<?php 

// +--
// | Get variables we need to draw this display.
// +--

$app      = $this->globals('khxc.app');
$ns       = $this->globals('khxc.namespace');
$eol      = $this->globals('khxc.eol');
$proddisp = $this->globals('ecom.prod_proddetail');
$xid      = $proddisp['id'];
$id       = $this->xhtml_encode($xid);

if ($ns == 'addcart') {$ns = 'prodshow';}

$this->globals('ecom.prod_proddisp',$proddisp);
$this->globals('ecom.prod_priceinfo',$proddisp['khxc.priceinfo']);

// +--
// | Create the product name and description.
// +--

$prodname  = $this->xhtml_encode($proddisp['name']);
$proddesc  = $proddisp['desclong'];
$hastags   = $proddisp['deschastags'];

if (empty($proddesc)) {

     $proddesc = $proddisp['descshort'];
     $hastags  = 0;

} // End of if statement.

if (empty($hastags)) {$proddesc = '<p>' . $this->xhtml_encode($proddesc) . '</p>';}

// +--
// | Create the image tag(s).
// +--

$imglist  = $proddisp['imglg'];

if (empty($imglist)) {$imglist = 'none.png';}

$imglist  = $this->make_list($imglist);
$imgwidth = $this->globals('khxc_settings.' . $app . '.imgsizeprodlg');
$imgtag   = '';

if (empty($imgwidth)) {$imgwidth = 200;}

foreach ($imglist as $num => $img) {

     $imgurl   = 'media/' . $app . '/prodlg/' . $img;

     $imgtag   .= '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
     $imgtag  .= 'alt="' . $prodname . '" />';

} // End of foreach statement.

// +--
// | Handle extra large image.
// +--

$showxl  = 0;

$imglist = $proddisp['imgxl'];

if (empty($imglist)) {$imglist = 'none.png';}

if (($imglist) && ($imglist != 'none.png') && ($ns == 'prodshow')) {

     $this->globals('khxc.load_lightbox',1);

     $showxl   = 1;
     $xlcount  = 0;
     $xlimgtag = '';
     $zlcount  = count($imglist);

     $imglist  = $this->make_list($imglist);

     if (count($imglist) == 1) {$text = 'View Larger Image';}
     else                      {$text = 'View Larger Image Slideshow';}

     foreach ($imglist as $num => $img) {

          $xlcount++;

          $xlurl  = $this->globals('khxc.url_nonssl');
          $xlurl .= '/media/' . $app . '/prodxl/' . $img;

          if ($xlcount == 1) {

               $xlimgtag .= '<p><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } else {

               $xlimgtag .= '<p class="hidden"><a href="' . $xlurl . '" rel="lightbox[prodgroup]" title="';
               $xlimgtag .= $prodname . '" class="khxc_hrefbutton">' . $text . '</a></p>';

          } // End of if statement.

     } // End of foreach statement.

} // End of if statement.

// +--
// | Print the display.
// +--

?>

<table id="proddetail--<?php print $id; ?>" class="khxc_cptbl_det">

<tr class="khxc_cptbl_det"><td class="khxc_cptbl_det">

<table class="khxc_ghost"><tr><td class="khxc_ghost" style="width: <?php print $imgwidth; ?>px">

<?php print $imgtag; ?>

<?php 

// +--
// | Handle the extra large image tag and email a friend link.
// +--

$emailfr = $this->globals('khxc_settings.' . $app . '.emailfriend');

if ($ns != 'prodshow') {$emailfr = 0;}

if (($showxl) || ($emailfr)) {

     print '<div style="width:' . $imgwidth . 'px">' . $eol;

     if ($showxl) {print $xlimgtag;}

     if ($emailfr) {

          $link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $proddisp['id']));

          print '<p><a href="' . $link_emailf . '" title="Email a Friend" ';
          print 'class="khxc_hrefbutton">Email This Item to a Friend</a></p>';

     } // End of if statement.

     print '</div>' . $eol;

} // End of if statement.

?>

</td><td class="khxc_ghost">

<p><strong><?php print $prodname; ?></strong></p>


  <?php 

// +--
// | Print the product options if we can add the item to the 
// | shopping cart or wish list and we're on the prodshow
// | namespace.
// +--

$add_ok = 1;

if (($proddisp['useinv']) && (!($proddisp['invlevel'] > 0))) {$add_ok = 0;}
if ($proddisp['pricestatus'] == 'D') {$add_ok = 0;}

if (($ns == 'prodshow') && ($add_ok)) {

     $this->include_namespace($app,'prodshowopt',array());

} // End of if statement.

?>


<?php $this->include_file($app,'pricedisp.php');?>

<br>

<font color="#ff0000">For further options on <strong>Number of Users</strong> and <strong>Subscription Periods</strong> please scroll down to below the product description.


</p></td></tr>

</table>

</td></tr></table>


<?php print $proddesc; ?>

<p>

I then inserted the tags to the long product descritption, and nothing!

I assume java is enabled, whats the best way to check.

Cheers

Trevor

Offline

 

#6 02-20-2008 10:33:41

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Multiple Pages Per Product?

What tags did you insert into the long description?  In what you posted I don't see any use of the tabber CSS class like John posted in his second example of how to use it.  Do you have an actual page we can visit to see what you have Trevor?

Offline

 

#7 02-20-2008 10:35:09

trev77
Member
Registered: 02-13-2008
Posts: 28

Re: Multiple Pages Per Product?

Hi John,

Not worry, I've worked it out. Me being daft and not realising that a) I needed to upload the tabber.js as a file in it's own right and b) needed to change the name of my skin directory in you code,

Cheers

Trevor

Offline

 

#8 02-20-2008 10:49:46

trev77
Member
Registered: 02-13-2008
Posts: 28

Re: Multiple Pages Per Product?

One other question,

I now notice that any header enclosed in <h1> now gets hidden when viewed and anything enclosed in <h1> is now huge,

Any thoughts as to why this is, I'm assuning it's a java thing

Cheers

Trevor

Offline

 

#9 02-20-2008 10:54:53

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Multiple Pages Per Product?

I'm not John but check your all.css file for multiple instances of h1 being declared paying close attention to the context of how it's being defined.  Since you added the tabber styling to all.css you may have ended up creating a conflict.

Offline

 

#10 02-21-2008 06:26:29

trev77
Member
Registered: 02-13-2008
Posts: 28

Re: Multiple Pages Per Product?

Thanks Dave,
Worked a treat.

Regards

Trev

Offline

 

#11 07-23-2008 07:22:33

daz_phil
Member
Registered: 10-11-2005
Posts: 52

Re: Multiple Pages Per Product?

If using the 'tabber' solution, will the extra product data be pulled from the database? eg, is it possible to store product specification info in the db and pull it out on a 'spec' tab?

Other than this solution, is there a way of including specific types of product info separately in the database for each product? I'm going to be switching from 5.1 to 6 and this is going to be a fairly important feature.

Offline

 

#12 07-23-2008 07:52:52

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

With the tabber solution all of the information is in the products long description you would just need to divid up the information into different division tags within the main tabber division.
You can create any number of new columns in any database that you like the bigger problem is getting that information into the display or used in the way you want.

John

Offline

 

#13 08-18-2008 12:04:26

daz_phil
Member
Registered: 10-11-2005
Posts: 52

Re: Multiple Pages Per Product?

OK thanks John, I'll take a look at that over the coming days.
Cheers,
Darren

Offline

 

#14 11-10-2008 11:44:21

Enox
Member
Registered: 06-12-2008
Posts: 69

Re: Multiple Pages Per Product?

Hi Guys

Im just trying this out, and so far i have uploaded the tabber.js file to my /khxc/skins/{skin_in_use}/scripts file.
changed my all.css file to include the example.css at the bottom

I am now at the point of inserting the code that John stated into the 3 product detail displays (found @ Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View)

John stated that you have to insert the code after the call for 'proddesc' (in all 3 files) . . .
could somebody please identify exactly where this is, as im not fully sure i have the right place . . .

Cheers

Enox

Offline

 

#15 11-10-2008 12:33:05

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

The code line that gets the product description is close to the bottom of the detail product views, the code will work either just before or after the call for the product description, and you really only have to place it into the display you want to use it in but I did all three. If you want  to see it you can go to my site and view a product detail, I use it in almost every product but there are some that I don't have it in.

John

Offline

 

#16 11-10-2008 12:43:48

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

Actually you don't even need to place the call for the java script into the product display codes as all you really need to do is include the line calling the script at the beginning when you create your description of the products, I just did that so I wouldn't have to keep writing that same line in hundreds of products.

John

Offline

 

#17 11-11-2008 05:08:54

Enox
Member
Registered: 06-12-2008
Posts: 69

Re: Multiple Pages Per Product?

Cheers for the info John,
I went ahead an inserted that code into all 3, after a few noobish errors on my part i thought i had finaly got everything right. . . 
But for some reason now it is generating 2 of the tabber things . . .  one where my long description normaly is (which is fine), and another after the 'add to cart' button.
Cant think why it would duplicate things.. .

Enox

Offline

 

#18 11-11-2008 18:06:26

magwa
Member
Registered: 09-22-2007
Posts: 321

Re: Multiple Pages Per Product?

Thanks to the clear instructions and examples I was able to enable this very easily.

I have a question regarding how search engines will view the content behind the various tabs.

Does Google simply view the tab separated content as one big content lump, or is there another interpretation of the content?

Any comments would be appreciated.

ps, John - lots of interesting equipment on your site !

Offline

 

#19 11-11-2008 18:20:47

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

Here is a google cached page from my site http://209.85.173.132/search?q=cache:zD … &gl=us as you will be able to see it is the same as on the site. I would think that they see the actual content as one large lump of information the same as if you turn off java which just displays the inter contents of the description.

John

Last edited by dh783 (11-11-2008 18:22:02)

Offline

 

#20 11-11-2008 18:43:03

magwa
Member
Registered: 09-22-2007
Posts: 321

Re: Multiple Pages Per Product?

Thanks for the quick reply John. I'm trying to make sure I don't hinder the indexing bots progress through the site, and having spent plenty of time reading Google stuff I'm aware of the potential pitfalls where Javascript is concerned.

Having turned Javascript off in my browser I can see the text as one lump, and also having viewed it in a text browser (lynx) I'm relatively happy it won't be detrimental to Google.

Any other viewpoints will of course be welcome.

Offline

 

#21 11-12-2008 06:46:23

Enox
Member
Registered: 06-12-2008
Posts: 69

Re: Multiple Pages Per Product?

has any one got any ideas why my product page might be duplicating the tabber? it has generated 2 . . . one where the long description would be, and another after my 'Add to cart' Button.

Any help would be greatly appreciated.

Offline

 

#22 11-12-2008 07:32:11

Enox
Member
Registered: 06-12-2008
Posts: 69

Re: Multiple Pages Per Product?

ok figured it out.... i had placed the call for the java script a cpl of lines too low on one of the 'Manage Catalog Product Displays: Detail Views'  ammended that and now its working great..

Thanks for all the info John!

Offline

 

#23 01-08-2009 11:28:46

robprotronica
Member
Registered: 12-16-2008
Posts: 106

Re: Multiple Pages Per Product?

Hi Guys,

Just tried this out and am having some problems getting the tabs to display. The tabber.js file is in the scripts folder for the skin I am using and I have added the example.css to the end of all.css

tried running this directly from the Product Long Description as follows:-


<script type="text/javascript" src="skins/KHXCMI5/scripts/tabber.js"></script>

<div class="tabber">

  <div class="tabbertab">
    <h3>Features</h3>
    Features content.
  </div>

  <div class="tabbertab">
    <h3>Specification</h3>
    Specification content.
  </div>

</div>

Instead of giving me tabs I get 2 dot points "Features" and "Specifications" as hyperlinks - (javascript:void(null)wink and then I get a listing of the heading followed by the respective content.

The path to the tabber.js is correct - if I mess with this I lose the "hyperlink" dot points. I have looked through the all.css file to see there is any obvious conflict but not sure if that is where I need to be looking or if something else is wrong.

any ideas?

Rob

Offline

 

#24 01-08-2009 12:32:06

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Multiple Pages Per Product?

If you want the tab name create the division tag like

Code:

<div class="tabber">

    <div class="tabbertab" title="Features">

        Features content

    </div>

    <div class="tabbertab" title="Specification">
 
        Specification Content

   </div>

</div>

This will give you the tabs as Featured and Specification.

John

Last edited by dh783 (01-08-2009 12:32:25)

Offline

 

#25 01-08-2009 12:55:00

robprotronica
Member
Registered: 12-16-2008
Posts: 106

Re: Multiple Pages Per Product?

Hi John,

Thanks for the quick reply.

tried the division tag as per your suggestion.

I still get the "dot point" tab titles only this time I only get the "Features content" followed by the "Specification content" - no repeat of the tab titles.

not sure how to tell if I need to be looking at if the script is running correctly or if it is an issue with all.css.

I have found a number of comments that say the output defaults to something like I have if the javascript is missing so maybe something is not working correctly. However, tabber is doing something since an incorrect path to the script results in the "dot point" titles disappearing.

Rob

Offline

 

Board footer