News:

Support the VirtueMart project and become a member

Main Menu

Different Product Images for Different Shopper Groups

Started by zeroscorte, March 09, 2016, 18:43:38 PM

Previous topic - Next topic

zeroscorte


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?

Studio 42


GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

Hi,
Of course, On using hack, in one word YES
But this is then a stupid question ;)

zeroscorte

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.