link manufacturer in product detail page to products

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jul 31, 2013 11:46 am
Reply with quote
Report this post
Dear all,
i'm using StoreBox for my ecommerce. In product detail page i have the link to "manufacturer" that point me to a modal box with the manufacturer logo and a second link "view all products ..."

Is it possible to link "manufacturer" in product detail page directly to "view all products" bypassing the modal box?


Thanks a lot.
User avatar
Fresh Boarder

teitbite
Wed Jul 31, 2013 7:14 pm
Reply with quote
Report this post
Hi

I'm sure it's possible, but I'm not sure how to do that. Please show me the page with an example of such thing and I'll think of something.
User avatar
Moderator

GK User
Thu Aug 01, 2013 11:34 am
Reply with quote
Report this post
Hi,
I have this on my product page! :)
In the productdetails/default.php (into your template) I have something like this to call manufacturer:

Code: Select all
      <?php
                           $iManufacturer = $this->product;
                           JRequest::setVar('virtuemart_manufacturer_id',$iManufacturer->virtuemart_manufacturer_id,'GET');
                           $model = VmModel::getModel('manufacturer');
                           $manufacturerURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $iManufacturer->virtuemart_manufacturer_id);
                           if ($iManufacturer->virtuemart_manufacturer_id !=0 ) {
                                 $manufacturer = $model->getManufacturer();
                                 $model->addImages($manufacturer,1);
                                 $manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image-product-page"',false);
                           } ?>
                        </div>
                        <div class="product-manufacturer-information">
                              <div class="pleft">
                                 <div class="product-field-type-S">
                                    <label class="product-fields-title" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL') ?></label>
                                       
                                 </div>
                              </div>
                              <div class="manufacturer-image pright">
                                 <a title="<?php echo JText::_('TPL_GK_LANG_VIRTUEMART_PRODUCTS_DISPLAY_MANUFACTURER_PRODUCTS') ?><?php echo $iManufacturer->mf_name; ?>" href="<?php echo $manufacturerURL; ?>"><?php echo $manufacturerImage; ?></a>
                              </div>
                        </div>
                                <div class="clear"></div>


Hope it helps!,

Regards,
User avatar
Gold Boarder

teitbite
Fri Aug 02, 2013 5:09 pm
Reply with quote
Report this post
Hi

Yes it may work. I have no site to check it, but solution looks ok. Thanks for sharing yoligrana :)
User avatar
Moderator

GK User
Sat Aug 03, 2013 11:09 am
Reply with quote
Report this post
You are welcome teitbite:)
The problem in my case with this addon is when you click on the manufacturer image, it shows only the same category you are, not all products from manufacturer.
I don't know if we can fix the code

Code: Select all
 $manufacturerURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id='


instead of "view category" to go to "view all products from manufacture" ?
:?:

Kind regards,
User avatar
Gold Boarder

teitbite
Tue Aug 06, 2013 5:30 am
Reply with quote
Report this post
Hi

This is a question to VM support I'm affraid. I do not even know if such view exists :(
User avatar
Moderator


cron