News:

Looking for documentation? Take a look on our wiki

Main Menu

Template problem with Custom Fields

Started by lemick28, March 01, 2017, 05:17:08 AM

Previous topic - Next topic

lemick28

When running Ja_vintas template with the latest version of Virtuemart installed on my site it appears that Joomlart uses their own version of Virtuemart and while using that template there is no "Custom attributes" there used to be with the older Virtuemart 2 on Ja vintas
for example the buyer cannot select a specific color although I have those custom attributes set and they do appear when using Beez template as they should.
I have imported into the templates/ja_vintas/html/com_virtuemart/productdetails the file customfield.php which I borrowed from the Virtuemart core files and renamed it "default_customfields.php". so the page loads (it would not without it) however it will not load the custom fields and shows the following errors:
Notice: Undefined variable: viewData in /home/lemick5/public_html/templates/ja_vintas/html/com_virtuemart/productdetails/default_customfields.php on line 15

Notice: Undefined variable: viewData in /home/lemick5/public_html/templates/ja_vintas/html/com_virtuemart/productdetails/default_customfields.php on line 16

Which is the following 2 lines
$product = $viewData['product'];
$position = $viewData['position'];

Thats it I have no idea where to go from there. Obviously Custom fields are Vital to my website.

Here is a link to the product page with custom attributes:
http://www.lemickracing.com/index.php/shop/road-racing/brakes/master-cylinders/beringer-master-cylinders/beringer-br12-master-cylinder-detail

Obviously some Virtuemart files are missing but I dont know which ones they are.
I tried importing the Whole com_virtuemart file into Ja_vintas template to replace Ja_vintas com virtuemart which doesnt work.

Can someone please direct me to which Virtuemart core files are needed in the template in order for the custom fields to work properly?

Jörgen

Hello

You say that Your VM layout works with the Beez template. Then it should be obvious that the problem is the custom template. Adjust the template by comparing the template files with the working files in standard VM. Or talk to the template designer about this.

regards Jörgen @ Kreativ Fotografi



Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

#3
Quote from: lemick28 on March 01, 2017, 05:17:08 AM
When running Ja_vintas template with the latest version of Virtuemart installed on my site it appears that Joomlart uses their own version of Virtuemart and while using that template there is no "Custom attributes" there used to be with the older Virtuemart 2 on Ja vintas
for example the buyer cannot select a specific color although I have those custom attributes set and they do appear when using Beez template as they should.
I have imported into the templates/ja_vintas/html/com_virtuemart/productdetails the file customfield.php which I borrowed from the Virtuemart core files and renamed it "default_customfields.php". so the page loads (it would not without it) however it will not load the custom fields and shows the following errors:
Notice: Undefined variable: viewData in /home/lemick5/public_html/templates/ja_vintas/html/com_virtuemart/productdetails/default_customfields.php on line 15

Notice: Undefined variable: viewData in /home/lemick5/public_html/templates/ja_vintas/html/com_virtuemart/productdetails/default_customfields.php on line 16

Which is the following 2 lines
$product = $viewData['product'];
$position = $viewData['position'];

Thats it I have no idea where to go from there. Obviously Custom fields are Vital to my website.

Here is a link to the product page with custom attributes:
http://www.lemickracing.com/index.php/shop/road-racing/brakes/master-cylinders/beringer-master-cylinders/beringer-br12-master-cylinder-detail

Obviously some Virtuemart files are missing but I dont know which ones they are.
I tried importing the Whole com_virtuemart file into Ja_vintas template to replace Ja_vintas com virtuemart which doesn't work.

Can someone please direct me to which Virtuemart core files are needed in the template in order for the custom fields to work properly?
$product = $viewData['product'];
$position = $viewData['position'];
is only used in VM 3, so your template cannot work.
And $viewData is only used in YOURSHOP\components\com_virtuemart\sublayouts\XXX.php or template override in same template subfolder html\com_virtuemart\sublayouts
SO you certainly bad copied this line of codes or the template devs.

GJC Web Design

why not just rename the the folder templates//ja_vintas/html/com_virtuemart  to templates//ja_vintas/html/com_virtuemart____

then your install will use the core VM template files

But it sounds like your template is simply not VM3 ready
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