VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: mtk on January 20, 2008, 03:08:39 AM

Title: Page Navigation
Post by: mtk on January 20, 2008, 03:08:39 AM
J!1.5 - Latest SVN
VM: 1172

In VM Global config, Site tab.

No matter what I choose for: Show Page Navigation at the Top of the Product Listing?
Page Navigation is alway shown...
Title: Re: Page Navigation
Post by: jenkinhill on January 22, 2008, 18:47:35 PM
Confirmed with VM 1175

Database Version: 4.1.22
PHP Version:       5.2.4
Web Server: Apache
VirtueMart 1.1: Ver. 1175
Joomla! Version: Joomla! 1.5 Final  and  1.0.14RC1
Title: Re: Page Navigation
Post by: aravot on January 22, 2008, 20:58:17 PM
I posted this once (http://forum.virtuemart.net/index.php?topic=31750.0) but turned out I was wrong, just to be clear which navigation are you guys talking about?
Title: Re: Page Navigation
Post by: mtk on January 22, 2008, 22:12:13 PM
Product navigation on the Browse page of a certain Category...
Title: Re: Page Navigation
Post by: aravot on January 22, 2008, 22:56:56 PM
Product navigation is controlled by flypage, that is why certain categories have and others not.
Title: Re: Page Navigation
Post by: mtk on January 22, 2008, 23:06:03 PM
Quote from: mtk on January 20, 2008, 03:08:39 AM
In VM Global config, Site tab.

No matter what I choose for: Show Page Navigation at the Top of the Product Listing?
Page Navigation is alway shown...
then why do we have a global config if it does nothing...
Title: Re: Page Navigation
Post by: aravot on January 22, 2008, 23:23:28 PM
That is for the page navigation <<Prev 1, 2, ... Next>>
Title: Re: Page Navigation
Post by: jenkinhill on January 22, 2008, 23:59:51 PM
Ah. You mean if there are more than a full page of products in a category?  Perhaps then the wording in the cp should be clearer?
Title: Re: Page Navigation
Post by: aravot on January 23, 2008, 00:16:28 AM
Actually I am not sure what it controls I thought it controlled <<Prev 1, 2, ... Next>> have been turning that on and off but can't see what it does, maybe a bug?
Title: Re: Page Navigation
Post by: jenkinhill on January 23, 2008, 00:23:30 AM
This is all I see when on and off. There is no difference.

(http://www.jenkinhill.net/vm/navigation.png)
Title: Re: Page Navigation
Post by: aravot on January 23, 2008, 00:29:03 AM
That is controlled by flypage.
Title: Re: Page Navigation
Post by: mtk on January 26, 2008, 12:06:30 PM
Show Page Navigation at the Top of the Product Listing? this is the Configuration setting.
Page Navigation is still shown in browse pages & at the bottom...

If this too is controlled from Flypage, then the configuration should say that...
Title: Re: Page Navigation
Post by: mtk on January 26, 2008, 12:08:27 PM
Quote from: aravot on January 23, 2008, 00:29:03 AM
That is controlled by flypage.
This is the code from the Default Theme:

if( $this->get_cfg( 'product_navigation', 1 )) {

regarding which setting? (it is obviously not Show Page Navigation at the Top of the Product Listing?)
Title: Re: Page Navigation
Post by: aravot on January 26, 2008, 20:57:34 PM
I am confused too, I have requested Soeren to have a look at this.
Title: Re: Page Navigation
Post by: Mike M on August 28, 2008, 01:32:47 AM
Quote from: aravot on January 26, 2008, 20:57:34 PM
I am confused too, I have requested Soeren to have a look at this.

Did this ever get addressed? I would like the product by product navigation to not be displayed. Yet when I disable the feature in the Site settings under Configuration, the navigation is still present.

I can comment this out in the flypage, but it seems to me that something is not connected between the configuration and the flypage.

The flypage even checks for a config variable:
if( $this->get_cfg( 'product_navigation', 1 )) {
if( !empty( $previous_product )) {
echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
}
if( !empty( $next_product )) {
echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
}
}
Title: Re: Page Navigation
Post by: mwalton10 on September 19, 2008, 17:44:28 PM
I too had the same problem.  The solution is simple to fix as the developer has forgotten to include the 'product_navigation' parameter on the components\com_virtuemart\themes\default\theme.xml  Simply add the line (e.g. after the 'showPathway' entry) and then it is automatically picked up by the theme configuration and works a treat:

<param name="product_navigation" type="radio" default="1" label="Show Prev/Next the Product Page?" description="Show Prev/Next  on the product details page ">
         <option value="1">Yes</option>
         <option value="0">No</option>
      </param>
Title: Re: Page Navigation
Post by: Leo on October 03, 2008, 02:25:57 AM
Thanks mwalton10, that worked perfectly!
Title: Re: Page Navigation
Post by: aravot on October 03, 2008, 22:04:25 PM
Thank you fixed in SVN.
Title: Re: Page Navigation
Post by: brandonjp on October 26, 2008, 22:58:09 PM
Quote from: mwalton10 on September 19, 2008, 17:44:28 PM
I too had the same problem.  The solution is simple to fix as the developer has forgotten to include the 'product_navigation' parameter on the components\com_virtuemart\themes\default\theme.xml  Simply add the line (e.g. after the 'showPathway' entry) and then it is automatically picked up by the theme configuration and works a treat:
<param name="product_navigation" type="radio" default="1" label="Show Prev/Next the Product Page?" description="Show Prev/Next  on the product details page ">
<option value="1">Yes</option>
<option value="0">No</option>
</param>

Well, same problem here.  I tried the fix in theme.xml, but I'm still not having any luck.  I even tried directly editing the virtuemart.cfg.php  --  but the top product nav links are still there!  Not sure what I'm missing. 

I don't really mind the nav links, I just want to turn them off because I can't figure out how to get the right one to go fully to the right side (see attached jpg).  I tried editing theme.css and my main joomla template theme css to no avail. 

Anyone have any suggestions for either of these issues?  For now I just removed the code from the flypage template to completely remove the nav. 

[attachment cleanup by admin]
Title: Re: Page Navigation
Post by: VGarcia on November 11, 2008, 16:33:53 PM
This fix isn't working for me, either.
Title: Re: Page Navigation
Post by: vjcoop on November 14, 2008, 01:58:00 AM
Hi.  This fix did not work for me.  I think its because some of you are talking about product page navigation and some are talking about category page navigation...

http://www.timecompass.com/tc/index.php/gift-packages-a-sets.html

If you look there, the category list shows "prev" and "next" even though the category has 3 products and there IS NO prev or next page.

Clearly, there's a broken conditional somewhere...anyone know where?  I added the product navigation tag to the default template xml file, but that's not it.  What controls the category browse pages?  The output of the page section is:

<!-- BEGIN PAGE NAVIGATION -->
<div class="nav" align="center">
   <ul class="pagination">
<li><span class="pagenav">&laquo;&laquo; Start</span></li>
<li><span class="pagenav">&laquo; Prev</span></li>
<li><span class="pagenav"> 1 </span></li>
<li><span class="pagenav">Next &raquo;</span></li>
<li><span class="pagenav">End &raquo;&raquo;</span></li>

</ul>   Results 1 - 3 of 3</div>
<!-- END PAGE NAVIGATION -->


So I downloaded the entire virtuemart store and did a search in files for "pagenav" - nuthin.  So I searched the default virtumart 1.5.7 and NUTHIN.  So, hmmm, is this in Joomla?  I feel like I'm takin crazy pills - what controls pagination for the virtuemart category page?

Thanks!
Title: Re: Page Navigation
Post by: kIsa_camel on December 11, 2008, 21:12:56 PM
Update :

Yeah, the printscreens awaited from the beginning came after such a long time.

Sorry for the below solution, never ever apply it but what i don't understand is the xml fix and selecting the right option didn't worked in my local system..However when I edited my codes like i told below, I was able to get rid of the previous / next product on the product flypage, the page where we see its details (and not the category, again not to cause confusion)

8)

Addition to the theme.xml fix :

Why it doesn't work is, it's not stated in an "if condition" which checks if we want to see this nav bar and configured it in our admin panel or not. Either this option is enabled or not, VM will put this navigation bar on the top of the flypage. so let's add a tiny fix and make it work :

in administrator/components/com_virtuemart/classes/ps_product.php, locate the line below :


[s]function get_neighbor_products( $product_id ) {[/s]

just below this, add the following line :

[s]if ( PSHOP_SHOW_TOP_PAGENAV =='1' ) {[/s]

finally we have to close our if condition by adding a "}" under the line

[s]return $neighbors;[/s]

in the same function.

What we do here is we put our condition before VM queries the database for the next and previous products in that category.

tested and confirmed in J 1.5.8 & VM 1.1.2

(please test in your test systems too and give feedback)

cheers ;D
Title: Re: Page Navigation
Post by: aravot on December 12, 2008, 19:51:01 PM
There seems to be a confusion as to which option controls what, hope following images will answer.

'Show Page Navigation at the Top of the Product Listing' controls display of Next/Previous page and number of Products on a page.

(http://www.protechsystems.us/stuff/joomla/vm/Beverage_1229105274984.png)


'Show Prev/Next Product Link' controls navigation link between products.

(http://www.protechsystems.us/stuff/joomla/vm/Blue%20Label_1229105302390.png)
Title: Re: Page Navigation
Post by: kIsa_camel on December 14, 2008, 19:16:11 PM
Thanks, i've updated my post above.
Title: Re: Page Navigation
Post by: Sparky9292 on March 31, 2010, 01:49:02 AM
*sigh* I wish this was in a manual somewhere.