Author Topic: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5  (Read 94363 times)

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« on: November 23, 2011, 11:33:40 am »
Since the original hack is greatly extended I decided to start a new thread for the update.
The current version, which will be attached there (and you will have a link to the download in my signature) will be available from my homepage too.
There are still rough corners, and the documentation needs update - this is the main reason I postponed the launch of this version - but the hack is perfectly usable, and the code is updated for VM 1.1.9 and Joomla 1.5.
It's backward compatible to VM versions 1.1.4 (tested) and might work even with earlier versions (1.1.2 and 1.1.3) too.
It's a core hack, use it on your risk!! Support is free, but it's only in the limits of free time I can dedicate to it (that's it, milk and bread is still sold on real money at my place too, and I am a professional freelancer, not a hobbyist). I'm usually overwhelmed with commercial jobs, so you can expect some delays in the responses.
If you want a quick and effective response, send me the following data along with your support request:
  • VM version
  • Joomla version
  • URL of the shop
  • VM template used
  • List of eventual VM hacks used others, that most recent version of CAE
Prepare yourself to the eventuality that I MAY need full access to the site in the case you cannot fix it yourself based on the tips provided.
And remember! This hack is built upon a work of couple of dedicated VM professionals, and contains code released as "side effect" of some commercial assignments, code released to the public with approval of the  people who where paid for it. And this trend will be continued, all code added will be shared - if I can obtain the consent of the buyer.

A relatively long, but incomplete list of contributors is found in the docs, and in the previous threads dedicated to this hack:
Converted Custom Attributes Extended Hack 2.1 for VM 1.1 + J1.5 - http://forum.virtuemart.net/index.php?topic=39666.0
Custom Attributes Extended 2.1 [Hack]  - http://forum.virtuemart.net/index.php?topic=28192.0
PS1. Since the new regulations in the forum does not let me put a link on the signature, you must came back here... or find my site where I also will list the hack.
PS2. Pay credits to ALL contributors. I am only a humble contributor to this hack, there are others, who developed it to the stage where I picked it up (first for my own needs) and weaken up in one day as the sole supporter of the hack. But this does not mean, that would be possible to read this and use this hack without work of Barnett (author of original hack), Joseph Kwan (who ported it to VM 1.1/Joomla 1.5), Nemesis02, Cer, Ben Stovall, Ruppert, Mike Taylor and many others I may forgot - my apologies for them!


[attachment cleanup by admin]
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

mizou125

  • Beginner
  • *
  • Posts: 1
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #1 on: November 23, 2011, 22:01:30 pm »
Hi,
Thank you for this version,
i have a error :
Fatal error: Class 'ps_product_custom_type_file ' not found in \administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 92

Can you help me please ??

cyb3r

  • Beginner
  • *
  • Posts: 2
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #2 on: November 23, 2011, 22:07:43 pm »
Hello webgobe,

really nice work! It is a nice hack for virtuemart. I have testet the functions a little bit and i have a problem with the addition of many price values from checkboxes.

I have created a product and add this to custom attributes list: Donate (checkbox)(Who do you want to donate to?|title-hover)(Widows [+5.00], Orphans[+10.00], Test[+20.00]). Now in the cart the values get not sum up. It works only if one checkbox is selected, but not for multiple selection.

Can you help me please to fix it?

Best Regards,
cyb3r

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #3 on: November 24, 2011, 08:23:40 am »
Fatal error: Class 'ps_product_custom_type_file ' not found in \administrator\components\com_virtuemart\classes\ps_product_custom_attribute.php on line 92
Send me an URL. Seemingly you didn't installed the hack correctly - or you use a VirtueMart template other, than the default one, and didn't made the modifications needed for the template.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #4 on: November 24, 2011, 08:26:09 am »
I have created a product and add this to custom attributes list: Donate (checkbox)(Who do you want to donate to?|title-hover)(Widows [+5.00], Orphans[+10.00], Test[+20.00]). Now in the cart the values get not sum up. It works only if one checkbox is selected, but not for multiple selection.
Hmm, probably will need SuperAdmin access to debug it. But let me try on local testbed site your attribute, to be sure that is working on my setup.
Update:
Works on my end, so it's something wrong with your setup
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

themiffs

  • Beginner
  • *
  • Posts: 4
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #5 on: November 24, 2011, 13:07:09 pm »
Hi Webgobe,

I have the latest custom attribute hack working well on my site but i use a paid add on called product builder, when this add on loads a product with the hack in it the page prints out the contents of what is typed into admin and does not run the code as it does on the normal fly page (which works fine) i use the window attributte. i wondered if anyone or yourself new if i could add some code into the product builder page to get the code running as it should.

Thank you very much


webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #6 on: November 24, 2011, 13:28:08 pm »
Hope someone will pick up your request. I am fully booked next couple of weeks. Maybe after 5-6th December may have some time...
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

amthucgiaitri

  • Beginner
  • *
  • Posts: 4
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #7 on: November 28, 2011, 08:17:52 am »
Hi webgobe,

I wonder that can we put a hyperlink on the radio option. What i want is whenever click on the images on the option box, it's will load a lightbox for the larger image or html.

Can we do that?

Thanks in advance,

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #8 on: November 28, 2011, 08:43:24 am »
The code which creates the radio boxes (with images) is found in /administrator/components/com_virtuemart/classes/ps_product_custom_type.php lines 146-240 and components/com_virtuemart/themes/default/templates/product_details/inclused/ps_product_custom_type_radiobutton_selector.tpl.php. You can play with the code, as you wish.
To add a lightbox to a larger image is something already implemented, check line 195 of the code. You can simply add the full image to the attribute's syntax, with adding a second image to each option, and that will be shown in a lightbox.
To add a link would need some extra coding, including changing/tweaking the syntax. It's not a 2 line tip.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

amthucgiaitri

  • Beginner
  • *
  • Posts: 4
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #9 on: November 28, 2011, 09:00:27 am »
Hi webgobe,

Thanks for your so fasting reply. Now i can load a light box as your instruction on putting the 2nd image on the attribute.

Now, i trying make it load an html link.

Thanks again for your reply and wonderfull hack.  ;)

hothotheat

  • Beginner
  • *
  • Posts: 2
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #10 on: November 29, 2011, 14:40:56 pm »
Hello webgobe,

really nice work! It is a nice hack for virtuemart. I have testet the functions a little bit and i have a problem with the addition of many price values from checkboxes.

I have created a product and add this to custom attributes list: Donate (checkbox)(Who do you want to donate to?|title-hover)(Widows [+5.00], Orphans[+10.00], Test[+20.00]). Now in the cart the values get not sum up. It works only if one checkbox is selected, but not for multiple selection.

Can you help me please to fix it?

Best Regards,
cyb3r

Same problem here. I have tested it on a fresh installation with the default theme.

I am using Joomla 1.5.23 and Virtuemart 1.1.9.

And while using the radio buttons i get a javascript error:
handleCheck is not defined

Best regards,
Stephan

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #11 on: November 29, 2011, 16:34:23 pm »
If you want a quick and effective response, send me the following data along with your support request:
  • VM version
  • Joomla version
  • URL of the shop
  • VM template used
  • List of eventual VM hacks used others, that most recent version of CAE
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

dido76bg

  • Beginner
  • *
  • Posts: 40
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #12 on: December 02, 2011, 01:09:49 am »
Hi!
It is a great hack
Is it possible to provide information about the exact changes in the vm files because I have made so many hacks and it is very hard to just copy and paste your hack.
I have extracted the changes.
Also:
Is it possible to add a description (tool tip with text or modal pop up including a joomla article) for each attribute (radio buttons)?
I try to do that by myself but when I add the product to the cart it stays empty.  I have changed the code of ps_product_custom_type.php.
Is it possible to make an add to cart button with quantites for eack custom attribute group?
Thanks!

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 542
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #13 on: December 02, 2011, 08:39:03 am »
Is it possible to add a description (tool tip with text or modal pop up including a joomla article) for each attribute (radio buttons)?
I try to do that by myself but when I add the product to the cart it stays empty.  I have changed the code of ps_product_custom_type.php.
Humm, need to explore the possibilities here, probably can be done, but you need to be VERY careful, all CAE - related trickery takes place in fact in the cart. If wrong things are passed to cart that can render the whole thing unusable.
Is it possible to make an add to cart button with quantites for eack custom attribute group?
Don't think so. You need to adopt another approach for that. CAE modifies the behavior of a PRODUCT. Different attribute groups are just different properties of the same product - and you can put in the cart only PRODUCTS.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

dido76bg

  • Beginner
  • *
  • Posts: 40
Re: Converted Custom Attributes Extended Hack 3.0 for VM 1.1 + J1.5
« Reply #14 on: December 02, 2011, 10:19:12 am »
Humm, need to explore the possibilities here, probably can be done, but you need to be VERY careful, all CAE - related trickery takes place in fact in the cart. If wrong things are passed to cart that can render the whole thing unusable.
I know it simply does not function. I will explorer.
Don't think so. You need to adopt another approach for that. CAE modifies the behavior of a PRODUCT. Different attribute groups are just different properties of the same product - and you can put in the cart only PRODUCTS.
May be I will try with child products, or to link a product, or to make an attribute with quantity box.

Have you ever tryed to make price update for that hack.