Comments on: Featured Products With Virtuemart https://www.leewillis.co.uk/featured-products-virtuemart/ Wed, 25 Jul 2012 19:02:52 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: Peter https://www.leewillis.co.uk/featured-products-virtuemart/#comment-3361 Wed, 25 Jul 2012 19:02:52 +0000 http://www.leewillis.co.uk/?p=61#comment-3361 What about Virtuemart 2? How to make it in new version?

]]>
By: Richard https://www.leewillis.co.uk/featured-products-virtuemart/#comment-1363 Wed, 20 Apr 2011 14:11:57 +0000 http://www.leewillis.co.uk/?p=61#comment-1363 Very many thanks! I spend half day to find this solution 🙂

]]>
By: Lee https://www.leewillis.co.uk/featured-products-virtuemart/#comment-799 Tue, 19 Oct 2010 06:25:59 +0000 http://www.leewillis.co.uk/?p=61#comment-799 In reply to Stay.

I’d do the date comparison on the MySQL server, and return it as a field. So – you probably want to amend the SQL in shop_browse_queries.php, to get a single field containing the age of the product, and then just check that in PHP.

I can’t help much beyond that really as I don’t have the time to set up foreign language installs etc. but that should point you in the right direction.

]]>
By: Stay https://www.leewillis.co.uk/featured-products-virtuemart/#comment-798 Mon, 18 Oct 2010 23:44:52 +0000 http://www.leewillis.co.uk/?p=61#comment-798 In reply to Lee.

To achieve the different styling for products that are added in last 2 weeks i put the following code:

<?php if ((time() – strtotime($cdate))

But it only works correctly if the site language is in English, in Portuguese it doesn´t work.

I think that may be something related to strtotime.

Can you point me in the right direction?

Thanks

]]>
By: Lee https://www.leewillis.co.uk/featured-products-virtuemart/#comment-551 Sun, 11 Jul 2010 18:42:43 +0000 http://www.leewillis.co.uk/?p=61#comment-551 In reply to Reincha.

The product creation date is already pulled back by the exi disting queries, so to flag “new” products, all you’d have to do would be to check the cdate in your browse page template, and add CSS/HTML as required.

I don’t think the existing queries pull back whether the product is discounted (product_discount_id > 0 if the product is discounted), but you could follow the same approach from this article to add the field, pass it through, and check for it in the browse page certainly.

]]>
By: Reincha https://www.leewillis.co.uk/featured-products-virtuemart/#comment-548 Sat, 10 Jul 2010 14:05:49 +0000 http://www.leewillis.co.uk/?p=61#comment-548 Can something like this be done with discounted products; and new produkts.

i want to have different styling for products that are added in last 2 weeks, also if price is discounted and the one you did – featured

]]>
By: Lee https://www.leewillis.co.uk/featured-products-virtuemart/#comment-15 Thu, 07 May 2009 21:07:18 +0000 http://www.leewillis.co.uk/?p=61#comment-15 As a quick update to this post – I’ve submitted a patch upstream to the Virtuemart guys so hopefully this will be included out-of-the-box in future.

The patch submitted can be found here:
http://www.leewillis.co.uk/patches/featured-products/featuredproducts2.diff

This implements all of the above, plus some small changes to the standard browse page templates. You’ll have to tweak your own Virtuemart templates to get the look you want obviously!

]]>