VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: zeroscorte on March 09, 2016, 18:43:38 PM

Title: Different Product Images for Different Shopper Groups
Post by: zeroscorte on March 09, 2016, 18:43:38 PM

Good Evening,

We're creating a new e-commerce with VirtueMArt 3.0.12 Joomla 3.4.8-
In order to distinguish our clients, we created different prices for each shopper group.


Would you please let me know whether it is possible to display different images with different discounts if the user, when logged in,  belongs to a specific group decided by the admin

Is it possibile (as it is for the prices) to link specif product images to specific groups?
Title: Re: Different Product Images for Different Shopper Groups
Post by: Studio 42 on March 10, 2016, 09:34:04 AM
Hi,
in One word : NO :)
Title: Re: Different Product Images for Different Shopper Groups
Post by: GJC Web Design on March 10, 2016, 11:31:28 AM
you could try a very hacky attempt

what ever your rendered image link is e.g. images/stories/virtuemart/products/lala.jpg do a str_replace dependent on Shopper group and put those images there

find shopper group  $shoppergroup
extract img link $imglink

if($shoppergroup > 1) { // or not default

$imglink = str_replace('.','$shoppergroup."."',$imglink);
}

if $shoppergroup wes 4 then the image link would be

images/stories/virtuemart/products/lala4.jpg

doing thumbs will be fun
Title: Re: Different Product Images for Different Shopper Groups
Post by: Studio 42 on March 10, 2016, 14:18:12 PM
Hi,
Of course, On using hack, in one word YES
But this is then a stupid question ;)
Title: Re: Different Product Images for Different Shopper Groups
Post by: zeroscorte on March 15, 2016, 18:37:25 PM
Thanks GJC Web Design for the answer, since I am not used to PHP could you please tell me which files I have to modify?
In other words, if someone of you can give me a hand, I would like to manage to link different images with different discount (i.e. 50-70%) to the same product of the shopper groups.