News:

Support the VirtueMart project and become a member

Main Menu

Page Navigation

Started by mtk, January 20, 2008, 03:08:39 AM

Previous topic - Next topic

mwalton10

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>

Leo

Thanks mwalton10, that worked perfectly!


brandonjp

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]

VGarcia

This fix isn't working for me, either.

vjcoop

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!

kIsa_camel

#21
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
http://www.sanalpos-tr.com
custom payment mods, modification projects, installation-configuration-migration support for vm

aravot

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.




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


kIsa_camel

Thanks, i've updated my post above.
http://www.sanalpos-tr.com
custom payment mods, modification projects, installation-configuration-migration support for vm

Sparky9292

*sigh* I wish this was in a manual somewhere.