News:

Looking for documentation? Take a look on our wiki

Main Menu

Add EAN field for VM 2.6

Started by ereallstaff, March 08, 2016, 17:32:01 PM

Previous topic - Next topic

ereallstaff

Hello due actually to very low free time needed to pass to vm 3.0 , I wanted to add only EAN to cart custom field.

I use type string as you can see in attachment . I have added ean as a column to DB table #_virtuemart_product_customfields , but they doesn't appear into field list . I suppose there simply column were parsed and printed as component inside attached form.

Anyone could kindly explain any step more?

THank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ì
Try out our new joomla background rotator ( for joomla 1.x or 2.x), for only 14,99 eur @ innovailweb.it

GJC Web Design

added a column in the DB?

completely un-nesscesary.. just use the custom string as normal and display on the templates
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

ereallstaff

Sorry but I don't understand you.

The custom string should remaing S, I just want to add near S in another field the EAN id as it's being required by most marketplaces and price comparator...

I can create another custom field with a string reference but this would be more work
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ì
Try out our new joomla background rotator ( for joomla 1.x or 2.x), for only 14,99 eur @ innovailweb.it

AH

It would have been simpler if you had added the field to the product table

(Note I said simpler and not necessarily the "best" way from a purist's viewpoint)

You could then adjust one core file to provide the new field to views and then create an override to the view in which you wish to display the field

Core field for the addition of the new field

administrator/components/com_virtuemart/tables/products.php

Add your new field

var $published = 1;

    /**  new variables */
    var $your_new_field_name = null;



Note that you will need to amend admin product views if you want to edit this field


Then create an override and echo the new field to display it.

Regards
A

Joomla 4.4.5
php 8.1