News:

Support the VirtueMart project and become a member

Main Menu

Creating of an custom field plugin: calender

Started by earlybird, July 17, 2013, 20:53:42 PM

Previous topic - Next topic

earlybird

I'm about to create a custom field Plug in which shows  a
joomla dateselector -> Jhtml:: ('calender, ...') instead of an Input field and I would like to share this also if it works

I'm VirtueMart 2.0.20b Joomla 2.5.11

So far everything worked fine, the dateselector is showing

I started to edit the File:
/plugins/vmcustom/textinput/textinput/tmpl/default.php

so that it looks like this


$class='vmcustom-datepicker';
$value = '';
$name = 'calender';
$id = $viewData[0]->virtuemart_customfield_id;
JHtml::_('calendar', $value, $name, $id);?>


I have now a module on the homepage: mod_virtuemart_product
and as long as i have:
Show Add-To-Cart Link? =   YES
which shows a product  also with the new dateselector but if I set:
Show Add-To-Cart Link? =   NO

then everything looks fine and the custom fields aren't shown anymore but i get an error message:

Calendar.setup:
  Nothing to setup (no fields found).  Please check your code

for me, This means the code

JHtml::_('calendar', $value, $name, $id);
in  /plugins/vmcustom/textinput/textinput/tmpl/default.php

is executed even if no custom field is shown on the Page.

I don't know why can someone help me with that ?




earlybird

Update,

the errormessage comes only if i make the custom field a cart attribute.
any Ideas ?

earlybird

I didn't found a solution yet
but i need this feature pretty soon,
so i uncommented this alert in the calender-setup.js file

this is no solution :(
so if someone has an idea or an working plugin (i would even pay for)

i would be pretty thankful

jurgen35

Hello,
I have one site created with joomla and I have installed VirtueMart 2.0.26d
I need one Calendar for VirtueMart which can do something like ths,

For example, When I select Date:

21 January automaticly shows 3 Time Events:

10:00am price 200$
13:00pm price 500$
23:10pm ptrice 35$

Or if I select differrent date for the same event, for example :

23 February , it's automaticly shows diffrent time and diferent price as 21 January :

15:19pm price 35$
20:50pm price 250$
...

Can anyone give me one solutions for this ?


Thank you,
Jurgen

GJC Web Design

2.0.26d????  hackers paradise... the current is 2.6.22

In VM3 is a standard calendar (date) custom field  (can't remember if VM2.6.22 has it)
but to interact with prices you would need to code it yourself..
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