News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Show Manufacturers information on "productdetails page"

Started by tobisagt, January 04, 2012, 00:44:16 AM

Previous topic - Next topic

rottenberg

#15
Hi

I'm looking for the same thing.

I have done a print_r($this->product)
For the manufactuer I've found :

  • [virtuemart_manufacturer_id]
  • [virtuemart_manufacturercategories_id]
  • [mf_name]
  • [mf_email]
  • [mf_desc]
  • [mf_url]

but nothing about manufacturerImage


Could the SQL giving those manufacturer info be modified for adding the manufactuerImage Url ?

levardar

I am looking for this problem form 4 days and I couldn't manage how to do it.

$this->product->virtuemart_manufacturer_id

with this we get the Manufacturer ID  But next????

tobisagt

I dont have installed the new VM upgrades, because i wait for stable.

Does anyone know if this is fixed in 2.01x ?

mygbn

No this problem is not fix in the latest version of virtuemart 2 is there any one that can figure this out as showing the manufactures image on product page would be far much better than have just the manufactures name.

rottenberg

The manufacturer logo may be important.
An image as a greater effect than a text.

lipes

<?php if ($manufacturer->images && ($show == 'image' or $show == 'all' )) { ?>
<?php echo $manufacturer->images[0]->displayMediaThumb('',false);?>
.........................................
<?php // Manufacturer of the Product
if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
echo $this->loadTemplate('manufacturer'); } ?>
.........................................
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"',false);
$this->assignRef('manufacturerImage', $manufacturerImage);
...
[virtuemart_manufacturer_id]  [mf_name]  [slug] [mf_email]  [mf_desc]  [virtuemart_manufacturercategories_id]  [mf_url]  [published]  [_pkey:protected]  [_pkeyForm:protected]  [_obkeys:protected]  [product_name]  [_unique:protected]  [_unique_name:protected]   [_orderingKey:protected]  [_slugAutoName:protected]  [_slugName:protected]  [_loggable:protected]  [_xParams:protected]  [_varsToPushParam:protected]  [min_order_level]  [max_order_level]   [_translatable]  [_translatableFields:protected]  [_tablePreFix]  [created_on]  [created_by]  [modified_on]  [modified_by]  [hits]  [virtuemart_product_price_id]  [virtuemart_product_id]  [virtuemart_shoppergroup_id]  [product_price]  [override]  [product_override_price]  [product_tax_id]  [product_discount_id]  [product_currency]  [product_price_vdate]  [product_price_edate]  [price_quantity_start]  [price_quantity_end]  [virtuemart_vendor_id]  [product_parent_id]  [product_sku]  [product_s_desc]  [product_desc]  [product_weight]  [product_weight_uom]  [product_length]  [product_width]  [product_height]  [product_lwh_uom]  [product_url]  [product_in_stock]  [product_ordered]  [low_stock_notification] [product_available_date]  [product_availability]  [product_special]  [product_sales]  [product_unit]  [product_packaging]  [product_params]  [intnotes]  [customtitle]  [metadesc]  [metakey]  [metarobot]  [metaauthor]  [layout]  [min_order_level]  [max_order_level]  [virtuemart_media_id]  [shoppergroups]  [categories]  [virtuemart_category_id]  [canonical]  [packaging]  [prices]  [costPrice]  [basePrice]  [basePriceVariant]  [basePriceWithTax]  [discountedPriceWithoutTax]  [priceBeforeTax]  [salesPrice]  [taxAmount]  [salesPriceWithDiscount]  [salesPriceTemp]  [discountAmount]  [priceWithoutTax]  [variantModification]  [DBTax]  [Tax]  [DATax]  [product_template]  [event]  [afterDisplayTitle]  [beforeDisplayContent]  [afterDisplayContent]  [images]   [media_attributes]  [setRole]  [_foldersToTest:VmMediaHandler:private]  [_actions:VmMediaHandler:private]   [_mLocation:VmMediaHandler:private]  [_hidden:VmMediaHandler:private]  [virtuemart_media_id]  [theme_url]  [virtuemart_vendor_id]  [file_title]  [file_description]  [file_meta]  [file_mimetype]   [file_type]  [file_url]  [file_url_thumb]    [file_is_forSale]  [file_is_product_image]   [shared]  [file_params]  [_translatable]  [_tablePreFix]  [created_on]  [file_url_folder]  [file_path_folder]  [file_name]  [file_extension]  [neighbours]  [previous]  [virtuemart_product_id] [next]
......................................................

So... we must start by:
<?php   // Manufacturer Image
echo $this->

?>

...............
Related in vm1:
http://forum.virtuemart.net/index.php?topic=45779.90 (Read 43687 times)
http://forum.virtuemart.net/index.php?topic=77894.0
http://www.richnetapps.com/virtuemart-show-manufacturer-logo-in-product-details/
http://www.kavdesign.net/blog/coding/virtuemart-how-to-show-manufacturer-logo-in-product-details/
.................
Quote from: slmandle on April 02, 2012, 20:29:10 PM
if you do print_r($this->product); you can call about your product you want to use "mf_name" echo $this->product->mf_name;
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

lipes

Found a solution... its not the better way to do this but i cant do in other way (i'm not a developer/codder/master programmer) :(

I've been searching and thinking for some days in this situation and my solution for this it's:
1 - calling the Image, from the Manufacturer folders that VM manufacturer Brand that you want;
2 - add that image in the description;  You will need to do that in every Brand Manufacturer (lots of work...)
3 - you can call that 'mf_desc' in your product template by typing this: <?php echo $this->product->mf_desc; ?>

If someone could help us in do this by better way..  :-\ without we need to add all images in all manufacturer descriptions we will be eternally grateful.
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 04, 2012, 16:40:10 PM
Found a solution... its not the better way to do this but i cant do in other way (i'm not a developer/codder/master programmer) :(

I've been searching and thinking for some days in this situation and my solution for this it's:
1 - calling the Image, from the Manufacturer folders that VM manufacturer Brand that you want;
2 - add that image in the description;  You will need to do that in every Brand Manufacturer (lots of work...)
3 - you can call that 'mf_desc' in your product template by typing this: <?php echo $this->product->mf_desc; ?>

If someone could help us in do this by better way..  :-\ without we need to add all images in all manufacturer descriptions we will be eternally grateful.


You could always use the ID as the image name, and place them in a folder yourself.

<img src="folder/<?php echo $this->product->virtuemart_manufacturer_id ?>.jpg ">

OR:
Use a string custom field to display the image
http://forum.virtuemart.net/index.php?topic=99225.msg327877#msg327877

AND: YOU can EASILY set the "is a list" to make applying them easier.

lipes

Tks Banquet  ;D

i use this code
<img src="<?php echo $this->baseurl ?>/images/stories/virtuemart/manufacturer/<?php echo $this->product->mf_name ?>.jpg ">
because my logos have the name of the brand..

but maybe is why i now have this problem: In some Manufacturer brands in image i have only the name like "Varta".jpg and the Brand name is the same .. but for others i have the sonyericsson.jpg but the name is sony ericsson .. and the images misses because we calls the sony%20ericsson.jpg

so.... the solution will be to change all Brand Manufacturer names in VM Backend ... and all images in folder and remove the text name and put numbers ?
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 04, 2012, 20:57:08 PM
Tks Banquet  ;D

i use this code
<img src="<?php echo $this->baseurl ?>/images/stories/virtuemart/manufacturer/<?php echo $this->product->mf_name ?>.jpg ">
because my logos have the name of the brand..

but maybe is why i now have this problem: In some Manufacturer brands in image i have only the name like "Varta".jpg and the Brand name is the same .. but for others i have the sonyericsson.jpg but the name is sony ericsson .. and the images misses because we calls the sony%20ericsson.jpg

so.... the solution will be to change all Brand Manufacturer names in VM Backend ... and all images in folder and remove the text name and put numbers ?

u do not need this

<?php echo $this->baseurl ?>

It will be a relative image url, and not an absolute.

Its however you want to do it

lipes

VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

Quote from: lipes on April 04, 2012, 21:14:13 PM
humm.. if i dont use <?php echo $this->baseurl ?>
the image displayed is broken/not found 'http://localhost/images/stories/virtuemart/manufacturer/Varta.jpg'




IF you are local, you can remove the /   at the begging

src="images"

lipes

damm.. lol work if i remove that "/" like you said... and i've started to change some brand manufacturer names to numbers.... argh....  ::)
now i need to go back again..
Tks for all! :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

ironlion37

Quote from: lipes on April 04, 2012, 16:40:10 PM
Found a solution... its not the better way to do this but i cant do in other way (i'm not a developer/codder/master programmer) :(

I've been searching and thinking for some days in this situation and my solution for this it's:
1 - calling the Image, from the Manufacturer folders that VM manufacturer Brand that you want;
2 - add that image in the description;  You will need to do that in every Brand Manufacturer (lots of work...)
3 - you can call that 'mf_desc' in your product template by typing this: <?php echo $this->product->mf_desc; ?>

If someone could help us in do this by better way..  :-\ without we need to add all images in all manufacturer descriptions we will be eternally grateful.

This would be good enough for me, but when I add <?php echo $this->product->mf_desc; ?> to flypage.tpl.php, it doesn't work in V 1.1.9. Any thoughts are much appreciated.

raheel

EUR is set as default currency in virtuemart 2. But when I import products using CSVI and set the currency to USD it still shows currency in EUR. I just want to change the currency fro EUR to USD for everything in my virtuemart 2 store.

How can i change the currency from eur to usd for all products in store.
thanks
Raheel