Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • sfpkent Friend
    #399516

    I have set as normal and linked to component.

    This is what I did. I go to Main Menu, click on button “Products”, under Internal Link I chose “Virtuemart”, and menu created, please refer to the attachment.

    This is normal what I did for other website, but just don’t understand why this site is not working.

    Kindly advice.

    Kent


    1. choosevirtuemart
    Sherlock Friend
    #399569

    Hi sfpkent,
    may be you don’t understand my explain,i know that you link products menu to virtuemart but to recent product show on home page you need link home menu item to virtuemart, this is root causion of the problem, Please see attachment , you can see that now the home page is link to single article so the recent product can’t show in home page.
    Hope can help you.

    sfpkent Friend
    #399578

    Hi hainn84, thanks for your continous helping. 🙂

    But, the front page that I mention is VIRTUEMART FRONTPAGE, not the WEBSITE FRONTPAGE.

    Which means, when users click on “Products” the latest products will show up on the product page, not “Home” page, this is the sample – try to go to this website http://demoda.com.my, click on “Product”, all the latest products will show up.

    http://demoda.com.my/index.php?page=shop.browse&category_id=6&option=com_virtuemart&Itemid=62&vmcchk=1&Itemid=70

    Please refer to this attachment.

    I want the latest products show on Virtuemart frongpage NOT…..Website Frontpage.

    But JA Mesolite II, when I already checked the “Show the latest products on the frontpage”, it doesn’t show up on VIRTUEMART FRONAGPAGE.

    From the beginning of this post, I stated clearly I need it on virtuemart front page.

    Thank you very much! 🙂


    1. virtuemartfrontpge
    Sherlock Friend
    #399580

    Hi sfpkent,
    Please see attachment , on your site i still see recent product in virtuemart home page.
    thanks

    sfpkent Friend
    #399582

    Hi hainn84,

    I believe there is HUGE difference between “recently viewed products” and “latest products” that I checked “Show the latest products on the frontpage”

    Recently viewed products are the products that you have viewed, while “Latest products” are the products that you just uploaded.

    You still don’t understand what I want.

    Ok, make it very simple.

    I want this page:
    http://biotechss.com.my/index.php?option=com_virtuemart&Itemid=71&vmcchk=1&Itemid=71

    look like this page:
    http://demoda.com.my/index.php?page=shop.browse&category_id=6&option=com_virtuemart&Itemid=62&vmcchk=1&Itemid=70

    Both pages are Virtuemart frontpage. Second website (demoda.com.my) has LATEST PRODUCTS (pls read carefully, LATEST PRODUCTS not RECENTLY VIEWED PRODUCTS) at its virtuemart frontpage.

    How to make it?

    Please read carefully – My requirement is, show LATEST PRODUCTS (not recently viewed products) on VIRTUEMART FRONTPAGE.

    Thanks!
    Kent

    sfpkent Friend
    #399585

    Hi hainn84,

    Check this image..

    As you can see on the tool tip, when the box “Show the latest products on the frontpage” is checked, there are products show up on VIRTUEMART Frontpage, it there is no products for my virtuemart front page.


    1. virtuemartfrontpage
    sfpkent Friend
    #399722

    Any news? I am sure there must be something wrong with the template. I have tried other templates. All of them are all right.

    Sherlock Friend
    #399723

    Hi sfpkent,
    sorry but in first post you tell that you need show recent products, now i checked again about latest product and see problem of it, This is a problem of Virtuemart please try to fix it following way in following thread :
    http://www.troubleshootingwiki.org/Troubleshooting_Joomla!_And_VirtueMart
    Hope can help you

    sfpkent Friend
    #399743

    trying now, will get back here…

    sfpkent Friend
    #399747

    It is not working, I have followed what your link mentioned.

    Replace this in /administrator/components/com_virtuemart/classes/ps_product.php file:

    function latestProducts($random, $products) {
    return “”;
    }

    With this

    function latestProducts($random, $category_id) {
    global $VM_LANG;
    require_once( CLASSPATH . ‘ps_product_attribute.php’);
    $ps_product_attribute = new ps_product_attribute();
    $max_items = 4;
    $db = new ps_DB;
    $tpl = new $GLOBALS[‘VM_THEMECLASS’]();
    $category_id = null;
    if($categories) {
    $category_id = vmRequest::getInt(‘category_id’);
    }
    $q = “SELECT DISTINCT product_sku,#__{vm}_product.product_id,
    product_name, product_s_desc,product_thumb_image, product_full_image, product_in_stock,
    product_url FROM #__{vm}_product, #__{vm}_product_category_xref, #__{vm}_category WHERE n”;
    $q .= “(#__{vm}_product.product_parent_id=” OR #__{vm}_product.product_parent_id=’0′) n”;
    $q .= “AND #__{vm}_product.product_id=#__{vm}_product_category_xref.product_i d n”;
    $q .= “AND #__{vm}_category.category_id=#__{vm}_product_category_xref.category_id n”;

    if( !empty( $category_id ) ) {
    $q .= “AND #__{vm}_category.category_id=’$category_id’ “;
    }
    if( CHECK_STOCK && PSHOP_SHOW_OUT_OF_STOCK_PRODUCTS != “1”) {
    $q .= ” AND product_in_stock > 0 “;

    }

    $q .= “AND #__{vm}_product.product_publish=’Y’ “;
    $q .= “ORDER BY #__{vm}_product.product_id DESC “;
    $q .= “LIMIT 0, $max_items “;
    $db->query($q);

    if( $db->num_rows() > 0 ){
    $i = 0;
    $latest_products = array();
    while($db->next_record() ){
    $flypage = $this->get_flypage($db->f(“product_id”));
    $latest_products[$i][‘product_sku’] = $db->f(“product_sku”);
    $latest_products[$i][‘product_name’] = $db->f(“product_name”);
    $price = “”;
    if (_SHOW_PRICES == ‘1’) {
    // Show price, but without “including X% tax”
    $price = $this->show_price( $db->f(“product_id”), false );
    }

    $latest_products[$i][‘product_price’] = $price;
    $latest_products[$i][‘product_s_desc’] = $db->f(“product_s_desc”);
    $latest_products[$i][‘product_url’] = $db->f(“product_url”);
    $latest_products[$i][‘product_thumb’] = $db->f(“product_thumb_image”);

    $latest_products[$i][‘product_full_image’]= $db->f(“product_full_image”);
    $latest_products[$i][‘product_id’] = $db->f(“product_id”);
    $latest_products[$i][‘flypage’] = $flypage;
    $latest_products[$i][‘form_addtocart’] = “”;
    if (USE_AS_CATALOGUE != ‘1’ && $price != “”
    && !stristr( $price, $VM_LANG->_(‘PHPSHOP_PRODUCT_CALL’) )
    && !$this->product_has_attributes( $db->f(‘product_id’), true )
    && $tpl->get_cfg( ‘showAddtocartButtonOnProductList’ ) ) {
    $tpl->set( ‘i’, $i );
    $tpl->set( ‘product_id’, $db->f(‘product_id’) );
    $tpl->set( ‘ps_product_attribute’, $ps_product_attribute );
    $tpl->set( ‘product_in_stock’, $db->f(‘product_in_stock’));
    $latest_products[$i][‘form_addtocart’] = $tpl->fetch( ‘browse/includes/addtocart_form.tpl.php’ );
    $latest_products[$i][‘has_addtocart’] = true;
    }
    $i++;
    }

    $tpl->set( ‘latest_products’, $latest_products );

    return $tpl->fetch( ‘common/latestProducts.tpl.php’);

    }
    }

    I can confirm that your template has problem.

    Please advice.
    Kent

    Sherlock Friend
    #399851

    Hi ,
    i make sure that the template is not problem in this case, you can go to virtuemart backend ans select default theme instead of “mesolite ii”, the problem still same here, the problem is missing “latestProducts.tpl.php” file in componentscom_virtuemartthemesdefaulttemplatescommon folder, i downloaded latest version of virtuemart it doesn’t has that file, you can see in obove code in last line it call that file “return $tpl->fetch( ‘common/latestProducts.tpl.php’);”
    i confirm that this is problem in virtuemart, not in JA template ==> please try to post this problem in virtuemart forum.
    thanks

    sfpkent Friend
    #399861

    Ok, this is expected. I already tried on virtuemart, they told me it is templat problem and asked me post in JA forum, now you asked me to go Virtuemart forum.

    This is actually not first time. Thanks for the help!

Viewing 12 posts - 16 through 27 (of 27 total)

This topic contains 27 replies, has 3 voices, and was last updated by  sfpkent 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum