Author Topic: Latest Products - Small Mod  (Read 2395 times)

32golf

  • Jr. Member
  • **
  • Posts: 68
Latest Products - Small Mod
« on: June 20, 2011, 21:10:27 pm »
Hi guys,
Just wondering if any of you know how to add a "View All In This Category" Link to the latest products module?


Regards

Ross

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #1 on: June 25, 2011, 15:22:25 pm »
Anyone?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #2 on: June 25, 2011, 15:46:19 pm »
you might can try this
<a href="index.php?page=shop.browse&category_id=<?php echo ps_product::get_field($product_id,'category_id'); ?>&option=com_virtuemart&Itemid=4">View All is This Category</a>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #3 on: June 25, 2011, 16:06:55 pm »
which line should i add that too?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #4 on: June 25, 2011, 16:17:49 pm »
the featured template is

featuredProducts.tpl.php

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #5 on: June 25, 2011, 17:21:20 pm »
This is in the latest products module

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #6 on: June 25, 2011, 17:29:03 pm »
Right got it working - but doesnt work with my virtuemart SEF turned on because of that href link building.

Any way around that?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #7 on: June 25, 2011, 17:38:24 pm »
http://virtuemart.net/documentation/Developer_Manual/Modifying_the_Layout.html#Templates
$sess

    Used to build (SEF-enabled) URLs that can be used in links.

    Usage:

    <a href="<?php echo $sess->url( $_SERVER['PHP_SELF'] .'?page=shop.product_details&amp;product_id='.$product_id ) ?>">Details...</a>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #8 on: June 25, 2011, 17:47:56 pm »
Sorry im not a PHP programmer at the moment - just learning - but will give it a go and post the results

Thanks for the info.

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #9 on: June 25, 2011, 18:22:38 pm »
Ok i tried to merge them 2 together with a few tweaks but it doesnt seem to want to work

$var = ps_product::get_field($product_id, 'category_id');
        ?>         <a href="<?php echo $sess->url( $_SERVER['PHP_SELF'] .'?page=shop.browse&category_id='.$var.'&option=com_virtuemart&Itemid=4'); ?>">Details...</a>         

Thats what i got.

Can you see anything wrong?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #10 on: June 25, 2011, 23:53:36 pm »
You dont have to set the var. I am not a php guy. But know you dont have to do that. Use the code i posted first right in the url
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #11 on: June 26, 2011, 00:47:32 am »
Cant seem to get it to work

When ever i put it in all i get is a blank white page with just 3 products on it. Very strange

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #12 on: June 26, 2011, 12:59:01 pm »
I will look at it on monday
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

32golf

  • Jr. Member
  • **
  • Posts: 68
Re: Latest Products - Small Mod
« Reply #13 on: June 26, 2011, 13:34:54 pm »
Ok mate cheers

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10330
  • VirtueMart Version: 3+
Re: Latest Products - Small Mod
« Reply #14 on: June 27, 2011, 16:41:57 pm »
I had a look at this, and dont know how to do it, I am not a php guy either
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)