News:

Looking for documentation? Take a look on our wiki

Main Menu

Need Itemid's for the related products in the add to cart pop up

Started by rizecorp, December 04, 2013, 12:37:50 PM

Previous topic - Next topic

rizecorp

Hi All,

I have configured the related products to display. But i need to customize as below:
1) Need to replace the "Product Names" with "Product SKU's" for the related products under product details page.
2) Need Itemid's for the related products image and name links showing on the show cart pop up.
3) Need to replace the "Product Names" with "Product SKU's" for the related products on the show cart pop up.

Please let me know if anybody knows. Please go through the attachments for more details.




Version Details:
1) MySQL    :  5.5.32-cll
2) PHP      :  5.3.23
3) Joomla   :  2.5.16
4) Virtuemart: 2.0.24c


Thanks in advance...

[attachment cleanup by admin]

rizecorp

Hi All,

Is anybody has the solution for my requirement above. Please let me know.

Thanks in advance..

GJC Web Design



product name as the link text is hard coded that way in the administrator\components\com_virtuemart\models\customfields.php

you could either hack that line 1138

return JHTML::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id,FALSE), $thumb   . $related->product_name, array('title' => $related->product_name));

to

return JHTML::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id,FALSE), $thumb   . $related->product_sku, array('title' => $related->product_name));

I think to get the Itemid in the popup will be difficult - the html for the related is preformed in the model above as
$this->product->customfieldsRelatedProducts->display

a quick test in components/com_virtuemart/views/cart/tmpl/padded.php (the popup template )  with $itemid = JRequest::getVar('Itemid'); is blank ..
so the popup can't get the Itemid even from the JFramework

so super fancy jquery find and replace???  :-\
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