vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - CartPlog: The Lite PayPal Shopping Cart (https://vborg.vbsupport.ru/showthread.php?t=161010)

calorie 11-13-2007 05:41 PM

Quote:

Originally Posted by Junkie (Post 1381868)
... What file and where exactly do I limit the number of products that display? I have tried quite few edits with no luck.

Find where $cartplog['popular_products'] is initialized in the cartplog.php file, and in the prededing query add a limit.

Quote:

Originally Posted by ragtek (Post 1381873)
i know that this is here standing:
but i need to put it left instead of center
am i allowed to do this?

Yes, you can move it to the left or right.

cuphongle 11-13-2007 05:41 PM

any of u guys have Cartplog added to Navbar???
i try look in every page but cant find it :)
help me out lolz

calorie 11-13-2007 05:47 PM

Quote:

Originally Posted by cuphongle (Post 1381883)
any of u guys have Cartplog added to Navbar???
i try look in every page but cant find it :)
help me out lolz

Via the ACP look at the vB navbar template. There are several links in that template that you can use as an example. Try it out. :)

ragtek 11-13-2007 05:49 PM

Quote:

Originally Posted by Junkie (Post 1381868)
In several posts back I asked:

"Is there a way to control the number tof products that show as popular products?"

You replied: "Find the popular products query in the code and add a limit to the query. There is no display order for products like there is for categories, but an order by clause could be added to the view category query."

What file and where exactly do I limit the number of products that display? I have tried quite few edits with no luck.

hi
look into the file at line 230(hope thats the right, i have modified my)
search for
PHP Code:

    $cartplog_product_infos $db->query_read("SELECT productid, catid, thumb, title, price
        FROM " 
TABLE_PREFIX "cartplog_products
        WHERE sales = " 
intval($cartplog_max_salescnt) . "
    "
);

    
$cartplog['popular_products'] = '';

    while (
$cartplog_product_info $db->fetch_array($cartplog_product_infos))
    {
        
$cartplog['product_productid'] = intval($cartplog_product_info['productid']);
        
$cartplog['product_catid'] = intval($cartplog_product_info['catid']);
        
$cartplog['product_thumb'] = strval($cartplog_product_info['thumb']);
        
$cartplog['product_title'] = htmlspecialchars_uni($cartplog_product_info['title']);
        
$cartplog['product_price'] = round(floatval($cartplog_product_info['price']), 2);

        eval(
'$cartplog[\'popular_products\'] .= "' fetch_template('cartplog_product_item') . '";');
        
$cartplog['popular_products'] .= '</tr><tr>';
    } 

here now limit the query
PHP Code:

WHERE sales " . intval($cartplog_max_salescnt) . " 

i hope thats it

NFLfbJunkie 11-13-2007 05:59 PM

Okay I find 3 instances of $cartplog['popular_products'] in the cartplog.php file. But I don't understand when you said "and in the prededing query add a limit."


PHP Code:

$db->free_result($cartplog_product_info);
$cartplog_product_infos $db->query_read("SELECT productid, catid, thumb, title, price
FROM " 
TABLE_PREFIX "cartplog_products
WHERE sales = " 
intval($cartplog_max_salescnt) . "
"
);
$cartplog['popular_products'] = '';
while (
$cartplog_product_info $db->fetch_array($cartplog_product_infos))
{
$cartplog['product_productid'] = intval($cartplog_product_info['productid']);
$cartplog['product_catid'] = intval($cartplog_product_info['catid']);
$cartplog['product_thumb'] = strval($cartplog_product_info['thumb']);
$cartplog['product_title'] = htmlspecialchars_uni($cartplog_product_info['title']);
$cartplog['product_price'] = round(floatval($cartplog_product_info['price']), 2);
eval(
'$cartplog[\'popular_products\'] .= "' fetch_template('cartplog_product_item') . '";');
$cartplog['popular_products'] .= '</tr><tr>';
}
$db->free_result($cartplog_product_infos);
$cartplog['popular_products'] = eregi_replace(preg_quote('</tr><tr>') . '$'''


cuphongle 11-13-2007 06:04 PM

hmm i tries this add this after that but doesnt work :(
<td class="vbmenu_control"><a href="cartplog.php$session[sessionurl_q]">$vbphrase[shopping]</a></td>

after this
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>

NFLfbJunkie 11-14-2007 12:52 AM

I am still trying to figure out how to limit the number of popular products that show on the main products page. The instructions given are not helping; not enough information really. More specific instructions would be greatly appreciated. Thanks.

cuphongle 11-14-2007 01:03 AM

true lolz
he/she trying make us do the hard thinking :)

dartho 11-19-2007 04:22 AM

Quote:

Originally Posted by cuphongle (Post 1381899)
hmm i tries this add this after that but doesnt work :(
<td class="vbmenu_control"><a href="cartplog.php$session[sessionurl_q]">$vbphrase[shopping]</a></td>

after this
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>

There is no "Shopping" phrase, if you want to use "Shopping" as the term you can create a new phrase, or hardwire "Shopping" as such:
HTML Code:

<td class="vbmenu_control"><a href="cartplog.php$session[sessionurl_q]">Shopping</a></td>

cuphongle 11-20-2007 08:18 PM

Quote:

Originally Posted by dartho (Post 1385324)
There is no "Shopping" phrase, if you want to use "Shopping" as the term you can create a new phrase, or hardwire "Shopping" as such:
HTML Code:

<td class="vbmenu_control"><a href="cartplog.php$session[sessionurl_q]">Shopping</a></td>

nice nice work :)
thanks you


All times are GMT. The time now is 01:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01458 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete