Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by Woodymon
xsell items show below tabs, so this will just have to do for me. Not really worth expending the extra energy troubleshooting this minor issue.
of course it is. The way it works is like this:
I take the sql query from the xsell_module.php file and set it to a variable. I take the record count of that variable to see if any products actually exist. If the value is greater than 0 then it will create the tab.
So thats a good thing, we know the query is working because it is showing the tab.
PHP Code:
// Cross Sell as tab or not
$xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $_GET['products_id'] . "'
and xp.xsell_id = p.products_id
and p.products_id = pd.products_id
and pd.language_id = '" . $_SESSION['languages_id'] . "'
and p.products_status = 1
order by xp.sort_order asc limit " . MAX_DISPLAY_XSELL);
$num_products_xsell = $xsell_query->RecordCount();
if ($num_products_xsell <> 0) {
echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' . "\n";
$g++;
}
That is the exact query that the actual xsell module uses. I just repeated it in my code. So now we know it is finding that something does exist in the database.
The next part of the code does the actual loading of that data.
PHP Code:
// Cross Sell on tabs (content)
if ($bCrossSell_Tab != false) {
echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
echo '</div>' . "\n" . '<!--eof CrossSell_Tab-->';
$a++;
}
All this part does is require the xsell template, the same way the normal way without tabs would do. Only difference is that I'm doing it inside <div></div> tags to make it be inside the container.
So If you could give me a copy of your View Source from a browser it would be helpful so I could tell if that part of the code was executed or not. It might be as simple as that.
Re: Tabbed Products ''LITE'' version - Delimiter based
Woody,
Are you inserting the AaQ code into the template display? If so... take it out and upload to check if your issue dissapear (I had this happening to me when I inserted the code on a wrong place).
Re: Tabbed Products ''LITE'' version - Delimiter based
$bGblProdDescTab = true;
Does this means if i don't have any tags in product descripiton(admin area), it still put the product description in a single tab??
If yes, it seems won't work.
Thnaks
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by ericpeng
$bGblProdDescTab = true;
Does this means if i don't have any tags in product descripiton(admin area), it still put the product description in a single tab??
If yes, it seems won't work.
Thnaks
yes that is what it means. can u link me to a site?
Re: Tabbed Products ''LITE'' version - Delimiter based
OK.. i found a bug.. that might fix your problem. It might even help Woodymon. Its a one character change that I was testing with and only causes a problem when only the GblProdDescTab or you use only one custom tag with no other tabs.
FIND
PHP Code:
if (($chkTabStart > 0 && $chkTabEnd > 0) || ($bAddToCart || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab)) {
REPLACE WITH:
PHP Code:
if (($chkTabStart >= 0 && $chkTabEnd > 0) || ($bAddToCart || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab)) {
note the ">" becomes ">=" for chkTabStart
That should fix it.
Re: Tabbed Products ''LITE'' version - Delimiter based
this has to be one of the best product display hacks I have seen for Zen... well done and a big thanks from me :)
Installed it on 1.3.2 with no prblems what so ever :)
Great work
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by sn0ut
this has to be one of the best product display hacks I have seen for Zen... well done and a big thanks from me :)
Installed it on 1.3.2 with no prblems what so ever :)
Great work
Thanks :) Great to hear! Glad you like it.
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by qhome
yes that is what it means. can u link me to a site?
I tried on one more test site, it seems works.
I'll try some more.
Thanks
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by ideasgirl
Are you inserting the AaQ code into the template display? If so... take it out and upload to check if your issue dissapear (I had this happening to me when I inserted the code on a wrong place).
As previously posted I am using only the code provided by Q. That means no edits, besides the few settings changes in the template file ;-)
I have been awaiting opportunity to repair xsell issue before injecting any custom code edits. I just now see that Q recommends an edit and will implement and report back. Thanks for the suggestions.
Re: Tabbed Products ''LITE'' version - Delimiter based
Quote:
Originally Posted by qhome
OK.. i found a bug.. that might fix your problem. It might even help Woodymon. Its a one character change that I was testing with and only causes a problem when only the GblProdDescTab or you use only one custom tag with no other tabs.
I'm a bit unclear to the above.
Although I have no tags within my product description I implemented the suggested change (change > to >=) but still the same issue with xsell (the "We Also Recommend" tab is rendering, but the container below the tab is not rendering).
Latest test using the following template file settings:
$bGblProdDescTab = true;
$bGblMainImageOnTabs = true;
$bGblAddToCart = true;
$bGblAdditionalImages = true;
$bGblCustomersAlsoPurchased = true;
$bCrossSell_Exists = true;
$bGblCrossSell_Tab = true;
$bShowHeaders = true;
$bShowHeadersNoJavascript = true;
$gbl_proddesc_tab_name = 'Product<br />Description';
$addtocart_tab_name = 'Add to<br />Cart';
$add_images_tab_name = 'Additional<br />Images';
$cust_also_purchased_tab_name = 'Customers<br />Also Purchased';
$cross_sell_tab_name = 'We Also<br />Recommend';