Up

Component Hacks

Various hacks for largely used Joomla components, as VirtueMart, jEvents, and others.

The hack for Converted Custom Attribues Extended Hack (CAE) is no more hosted at this site, the latest version is posted at http://forum.virtuemart.net/index.php?topic=39666.

Converted Custom Attributes Extended Hack 2.1 with surface calculation for VM 1.1 + J1.5
Converted Custom Attributes Extended Hack 2.1 with surface calculation for VM 1.1 + J1.5
Version:
1.0.6
License:
Date:
04 Ianuarie 2011
Downloads:
645 x

The original hack is described - and discussed - in VirtueMart Forums

I added to the original pack the "surface" type of extended attribute, leaving the rest unaltered.

In the example used here the sizes are in centimeters, the price is set per square meter.

The extra attribute's syntax for surface calculation is simple:

Banner (surface)(Some nice tip to be shown|title-hover)(100|100|1|18|10|16|25|14|100)

Where:

  • Banner is the freely replaceable name of the attribute - you need to have something there ;)
  • (surface) is the type of the attribute, this must remain as is
  • (Some nice tip to be shown|title-hover) is the tooltip text as per original syntax, first part is the tooltip, second id the placement (where will be shown).

The third part break downs as follows:

(100|100|1|18|10|16|25|14|100) - or -

(default width|default length|limit1|price1|limit2|price2|limit3|price3|multiplier)

Default width and length are used to prefill the boxes. For normal operation of the hack the values should not be zero. These values are in the example in centimeters. It's recommended to prefill them with some minimal sizes, under winch you charge the default price, no matter what.

  • limit1 is the first step, in example in square meters. All sizes below that are charged with the original price - this case 18 euro. Price1 is the price to use for sizes between limit1 and limit2 - this time the same 18 euro -MUST BE THE SAME OR BIGGER AS THE PRODUCT'S BASE PRICE, the hack calculates the additional price for the extra surface above the default one.
  • limit2 is the second step, price2 is applied for sizes between limit2 and limit3.
  • limit3 is the last limit, price3 is applied for all sizes above limit3.

Multiplier is a parameter to let you choose different units for length/width attributes (for example centimeters) and for surfaces (limits, prices/surface units for example in square meters) For the above example the "multiplier" must be set to 100 - obviously, 1 meter = 100 centimeters. Can be ignored, defaults to 1 - so the hack presumes that you use same units for all variables.

If you use the English language, and you did not modified it for some reason, just overwrite it with the content of the hack.
If you already modified it - or you need to use the hack on a non-english site, then edit the /administrator/components/com_virtuemart/langguages/common/YOURLANGUAGE.php,
where YOURLANGUAGE is obviously your language Tongue out, locate at the end this code:

); $VM_LANG->initModule( 'common', $langvars );
?>

 

and add before:

'PHPSHOP_HEIGTH' => 'Height',
'PHPSHOP_WIDTH' => 'Width'

And, of course, add a comma (,) at the end of previous line, otherwise you will generate an error.
Translate the strings after => to your language, and you're done!

No discount added for wholesalers
No discount added for wholesalers
File Size:
2.71 kB
Version:
1.0.2
License:
Date:
22 Martie 2010
Downloads:
197 x

Often you can meet the following situation:

In the shop you have at least 2 shopper groups active: the default shoppers which may have discounts on some products (time limited promotions mostly) and another group (typically the wholesalers group/groups), which can have a permanent (and consistent) group discount on all products.

The problem this hack solves is, that the product specific discounts will not be added to other groups, that the one designated as being the default (like the wholesaler's group), so if product A has a promotion set to 50% and the wholesaler group has a general discount of 50%, then the wholesalers will no more get the price for product A at 25% of the original price (50% applied twice).

So the solution in this package solves this problem: prevents that the product specific discounts to be applied for other shoppers than those from shopper group designated as being the default group (if you did not tweaked that, this is the  -default- group, but the hack below locates the group set actually as being the default - the group where new users are assigned by default).

We have 2 solutions packed here, you can use one fits your needs and skills - depending on version of VirtueMart you use. First solution, wich  was tested and works on VirtueMart versions 1.1.2, 1.1.3 and 1.1.4  need a core hack (hacking the ps_product.php class file - not quite a solution for beginners), the second works only on VirtueMart 1.1.4, without the need to change core code. Thanks for "rb" on VirtueMart forums for the second solution!

Converted Custom Attributes Extended Hack 2.1 with surface, windows, window blinds and windowsill calculation for VM 1.1 + J1.5
Converted Custom Attributes Extended Hack 2.1 with surface, windows, window blinds and windowsill calculation for VM 1.1 + J1.5
File Size:
328.49 kB
Version:
1.0.3
License:
Date:
22 Aprilie 2010
Downloads:
443 x

The original hack is described - and discussed - in VirtueMart Forums. The code here is based in an older version of the hack, I no more update it, if you need it, and you don't manage to do it yourself, drop me a mail.

There are 3 extra attributes added to the original hack:

  1. the "surface" type of attribute,
  2. the "window" type of attribute
  3. the "windowsill" type of attribute.

1. The "surface" type of extra attribute.

It was added to cover an obvious need - to dynamically calculate the price for products (as for example printed banners) with changing width and heigth.

The extra attribute's syntax for surface calculation is simple:
Banner (surface)(Some nice tip to be shown|title-hover)(100|100|1|18|10|16|25|14)
Where: Banner is the freely replaceable name of the attribute - you need to have something there ;)

(surface) is the type of the attribute, this must remain as is

(Some nice tip to be shown|title-hover) is the tooltip text as per original syntaxt, first part is the tooltip, second id the placement (where will be shown).

the third part break downs as follows:

(100|100|1|18|10|16|25|14)

(default width|default lenght|limit1|price1|limit2|price2|limit3|price3)

and works as follows:

Default widht and lenght are used to prefill the boxes. For normal operation of the hack the values should not be zer. these are in centimeters, so it's recommended to prefill them with some minimal sizes

limit1 is the first step, in meters. All sizes below that are charged with the original price - this case 18 euro. Price1 is the price to use for sizes between limit1 and limit2 - this time the same 18 euro - can be different for default.

limit2 is the second step, price2 is applied for sizes between limit2 and limit3.

limit3 is the last limit, price3 is applied for all sizes above limit3.

2. The "window" type of extra attribute


The "window" type of extra attribute is based on the "surface" type, with couple of changes.
Is destinated for calculating "window" type of products, with "rolo" (window blinds) included.
The syntax is:
Window (window)(Some nice tip to be shown|title-hover)(min_width|min-height|max_width|max_height|price_per_sqm|window_blinds_price_per_sqm|extra_blinds_height);
The parameters are self explanatory, let's see how it looks in a real life example: Fenetre (window)(|)(350|350|1800|2100|10|2|200);

So, 350*350 mm is the min_width*min_height of the window (all length units are in mm)
1800*2100 mm is the max_height*max_width of the window
10 is the price in the shop currency (in the example, 10 euro) of the window ABOVE THE DEFAULT PRICE, for the surface which exceeds the minimal dimensions.
2 is the price of the window blinds per square meters (full surface is calculated, including the extra height, see below)
200 mm is the extra height added to the window blinds, needed (or not) by technological reasons, so if the whndow choosen by the client is 1000 mm height, he will need
1200 mm blinds to function correctly in the above example.
The blinds related parameters can be zero, but must be present!

3. The  "windowsill" type of attribute

The "windowsill" type of attribute can be used ONLY TOGETHER WITH THE ABOVE!, so works only when "window" type of attribute is present, and it's BEFORE of
this attribute. It's very important, because uses in calculations the "width" value collected by that.

The syntax is:
Windowsill (pervaz)(Some nice tip to be shown|title-hover)(attribute1 [price1],attribute2 [price2],...)

There can be an unlimited amount of attributes, comma separated. Prices can be zero - no price to be added - in that case the square brackets are don't needed,
or will be in form of [+price_of_a_meter].
Let's see a real life example:

Pervaz (pervaz)(|)(none,Blue [+5.00],Red[+10.00])

So, first attribute means no windowsill is needed.
Blue [+5.00] is a windowsill named Blue with price of 5 euro/m, so if the window choosen above is 500 mm widht, the attached windowsill will be obviously also 500 mm, and will cost 2,5 euro.


If you use the English language, and you did not modifyed it for some reason, just overwrite it with the content of the hack.
If you allready modifyed it - or you need to use the hack on a non-english site, then edit the /administrator/components/com_virtuemart/langguages/common/YOURLANGUAGE.php,
where YOURLANGUAGE is obviously your language ;), locate at the end this code:

); $VM_LANG->initModule( 'common', $langvars );
?>

and add before:

'PHPSHOP_ROLO' => 'Window blinds',
'PHPSHOP_WITH_ROLO' => 'with window blinds',
'PHPSHOP_HEIGTH' => 'Heigth',
'PHPSHOP_HEIGTH_ALLOWED' => ' Allowed heigth is between %s mm and %s mm',
'PHPSHOP_HEIGTH_ERROR' => 'Heigth not in allowed limits, values entered for dimensions will be ignored, defaults will be used instead.',
'PHPSHOP_WIDTH' => 'Width',
'PHPSHOP_WIDTH_ALLOWED' => ' Allowed width is between %s mm and %s mm',
'PHPSHOP_WIDTH_ERROR' => 'Width not in allowed limits, values entered for dimensions will be ignored, defaults will be used instead.'

And, of course, add a comma (,) at the end of previous line, otherwhise you will generate an error.
Translate the strings after => to your language, and you're done!

Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
File Size:
177.40 kB
License:
Date:
23 Noiembrie 2011
Downloads:
57 x

Here you can find the latest version of the Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5 listed on VirtueMart's forum .

Manuals can be found here: {phocadownload view=file|id=31|target=s}

Documentation for Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
Documentation for Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
File Size:
171.24 kB
Version:
0.9
License:
Date:
23 Noiembrie 2011
Downloads:
59 x

Beta-version of the user manual of Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5.

Check back, file will be regularly updated!

 
 
Powered by Phoca Download

Recommendations

I cannot praise Denes enough both for his professional Skills and his Friendship, a man who will go out of his way to ensure his clients are Happy I am proud to have him Top of my Freelancer list

Bob Bentley
CEO at Mammoth Marketing
August 15, 2006


Always prepare before you make a choice. There is so much info about earnwith at https://earnwith.me

Joomla Security

Do you need a helping hand to keep your Joomla site in top shape?

You need someone to keep your site safe? If you want to know, what we can do for you, here is a short list:

  • We are performing a security audit - and we repeating this regularly
  • We are appliying all upgrades to the site as needed
  • We are adding our mix of security tools, settings and patches
  • We are setting up a backup procedure to ensure, that your data is safe
  • We are monitoring for uptime and unwanted activity
  • We are correcting any issues found
  • We are supporting all current and upcoming Joomla versions

Sit back and relax - we are doing the mundane work for you!

You only need to get your portion of Joomla Security Update today!

 

Act de renunțare

webGóbé și acest site nu este afiliat sau aprobat de Joomla! Project™. Toate produsele și serviciile furnizate prin intermediul acestui site nu sunt suportate sau garantate de The Joomla! Proiect sau de Open Source Matters, Inc. Utilizarea numelui, simbolului, siglei și mărcilor asociate Joomla! ® este permisă în baza unei licențe limitate acordată de Open Source Matters, Inc.

Toate articolele descărcate în aceste pagini sunt fișiere zip care nu conțin programe malware, adware sau alte tipuri de conținut periculos. Acestea sunt menite să fie utilizate ca extensii de Joomla CMS și nu instalați sau modificați nimic pe computer. Informații speciale despre instalare / dezinstalare - dacă este diferită de procedura standard de instalare / dezinstalare a extensiei Joomla - sunt conținute în fiecare pachet - și sunt disponibile pe pagina de descărcare înainte de a face clic pe butonul Descărcare.

Download Tree

Joomla Tips

Joomla Tips!® - the best tips for the best dynamic portal engine and content management system
URL: http://www.webgobe.com/ro/category/3-component-hacks.html

Sign In or Create Account