Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Better yet... is it possible for me to leave the main content (image, title, price) where it is and move the product options and add to cart button up next to it?
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
sweettease
Better yet... is it possible for me to leave the main content (image, title, price) where it is and move the product options and add to cart button up next to it?
In the file includes/templates/your_template_name/templates/tpl_product_info_display.php
Find this block of code and move it to after what you want to show above the tabs.
Code:
<?php
//BOF :: Tabbed Products Pro ::
echo '<div id="tpptabBlock" style="display:none;">' . $tabData . '</div>';
//EOF :: Tabbed Products Pro ::
?>
For example, if you want the tabs to start after your product attributes, place it after you see
<!--eof Attributes Module-->
hope that helps!
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
TamaraSFL
In the file includes/templates/your_template_name/templates/tpl_product_info_display.php
Find this block of code and move it to after what you want to show above the tabs.
Code:
<?php
//BOF :: Tabbed Products Pro ::
echo '<div id="tpptabBlock" style="display:none;">' . $tabData . '</div>';
//EOF :: Tabbed Products Pro ::
?>
For example, if you want the tabs to start after your product attributes, place it after you see
<!--eof Attributes Module-->
hope that helps!
Thanks, that helped a lot! Now if I could just figure out how to get the attributes and add to cart centered on the page under the price.
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
TamaraSFL
In the file includes/templates/your_template_name/templates/tpl_product_info_display.php
Find this block of code and move it to after what you want to show above the tabs.
Code:
<?php
//BOF :: Tabbed Products Pro ::
echo '<div id="tpptabBlock" style="display:none;">' . $tabData . '</div>';
//EOF :: Tabbed Products Pro ::
?>
For example, if you want the tabs to start after your product attributes, place it after you see
<!--eof Attributes Module-->
hope that helps!
My suggest is to leave the TPP code where it is and move the other product info code instead.. While it sounds like I am saying the same thing you did, my concern is that a newbie might inadvertently mess up the TPP code by moving messing with it..
Quote:
Originally Posted by
sweettease
Thanks, that helped a lot! Now if I could just figure out how to get the attributes and add to cart centered on the page under the price.
You might try posting this question in a new thread.. Your questions are really more about formatting the product information page and really are TPP support questions..
After adding the tabs, most other changes to the product information page are about modifying the includes/templates/your_template_name/templates/tpl_product_info_display.php and CSS changes to achieve whatever look it is that you are after..
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
DivaVocals,
I was hoping you could chime in on my post #1809.
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
dlwwalton
DivaVocals,
I was hoping you could chime in on my post #1809.
I'm not sure why you are manually editing the product info page.. the TPP fileset includes a file that is already modified.. If your product information page is modified, then use a file merging program to merge in the TPP edits. If you are making these edits manually, then you need to check your edits..
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
Webmart
I've installed ultimate_cross_sell too, but i've many problems to replace it with the original cross sell.
in
includes/modules/tabbed_products_pro.php
i've replaced:
PHP Code:
//Check if CrossSell contrib is installed and enabled to create its tab data
if (file_exists(DIR_WS_MODULES . 'xsell_products.php') or file_exists(DIR_WS_MODULES . $template_dir . '/' . 'xsell_products.php')) {
$bCrossSell_Tab = strpos($proddata, "<!--#CrossSell#-->");
if ($bGblCrossSell_Tab == true && $IgnoreGlobals === false) {
$bCrossSell_Tab = 1;
}
} else {
$bCrossSell_Tab = 0;
}
with
PHP Code:
//Check if CrossSell contrib is installed and enabled to create its tab data
// if (file_exists(DIR_WS_MODULES . 'xsell_products.php') or file_exists(DIR_WS_MODULES . $template_dir . '/' . 'xsell_products.php')) {
if (file_exists(DIR_WS_MODULES . 'ultimate_cross_sell_products.php') or file_exists(DIR_WS_MODULES . $template_dir . '/' . 'ultimate_cross_sell_products.php')) {
$bCrossSell_Tab = strpos($proddata, "<!--#CrossSell#-->");
if ($bGblCrossSell_Tab == true && $IgnoreGlobals === false) {
$bCrossSell_Tab = 1;
}
} else {
$bCrossSell_Tab = 0;
}
and
PHP Code:
if ($bCrossSell_Tab != 0) {
$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) {
$tabstrip .= "\n" . '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' . "\n";
$g++;
}
}
with
PHP Code:
if ($bCrossSell_Tab != 0) {
/* $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(); */
$cross_sell_sort_by = CROSS_SELL_SORT_ORDER . $mxsell=="sort_order"?" order by xp.sort_order asc ": " order by rand() ";
$cross_sell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
from " . TABLE_PRODUCTS_CROSS_SELL . $cross_sell . " xp, " .
TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where xp.products_id = '" . $_GET['products_id'] . "'
and xp.cross_sell_id = p.products_id
and p.products_id = pd.products_id
and pd.language_id = '" . $_SESSION['languages_id'] . "'
and p.products_status = 1 ".
$cross_sell_sort_by." limit " . constant(MAX_DISPLAY_CROSS_SELL . $cross_sell) );
$num_ultimate_cross_sell = $cross_sell_query->RecordCount();
// if ($num_products_xsell != 0) {
if ($num_ultimate_cross_sell != 0) {
$tabstrip .= "\n" . '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' . "\n";
$g++;
}
}
at last
PHP Code:
// Pre-load Cross Sell
if ($bCrossSell_Tab != 0 && $num_products_xsell != 0) {
ob_start();
'tpl_modules_xsell_products.php');
require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php'); 'tpl_modules_ultimate_cross_sell_products.php');
with
PHP Code:
// Pre-load Cross Sell
// if ($bCrossSell_Tab != 0 && $num_products_xsell != 0) {
if ($bCrossSell_Tab != 0 && $num_ultimate_cross_sell != 0) {
ob_start();
// require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
require($template->get_template_dir('tpl_modules_ultimate_cross_sell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_ultimate_cross_sell_products.php');
I've no php errors but tpl_product_info_display page is "empty", any help?
Did anyone get this working for Ultimate Cross Sell? I've tried to add a new tab with instructions from the pdf file but always end up with an sql error and my eyes are crossing lol
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
NM I gave up trying to get it to work and uninstalled the Ultimate mod, installed the Cross Sell mod that already has support inbuilt :)
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
I am not actually manually editing the file. I loaded all the files per the read me. When I load the tpl_product_info_display.php file from the TPP file set, then the products do NOT display on the product page anymore.
I then tried winmerge to merge my original file and that gave the same result.
Then per the read me I tried to manually edit MY tpl_product_info_display.php file. and I noticed that when this code is added then the products do NOT appear anymore on the actual product page.
<?php
//BOF :: Tabbed Products Pro ::
require(DIR_WS_MODULES . 'tabbed_products_pro.php');
//EOF :: Tabbed Products Pro ::
?>
Re: Tabbed Products Pro (TPP) Contrib - Official Thread
Quote:
Originally Posted by
dlwwalton
I am not actually manually editing the file. I loaded all the files per the read me. When I load the tpl_product_info_display.php file from the TPP file set, then the products do NOT display on the product page anymore.
I then tried winmerge to merge my original file and that gave the same result.
Then per the read me I tried to manually edit MY tpl_product_info_display.php file. and I noticed that when this code is added then the products do NOT appear anymore on the actual product page.
<?php
//BOF :: Tabbed Products Pro ::
require(DIR_WS_MODULES . 'tabbed_products_pro.php');
//EOF :: Tabbed Products Pro ::
?>
If by "the products do NOT display on the product page anymore" you mean you get a blank page, then you need to check your error logs and see what error you are getting.. Honestly this sounds like an installation/configuration issues and without more information like an error log message I don't know how to help here..