Author Topic: Custom Attributes Extended 2.1 [Hack]  (Read 523952 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.
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #450 on: October 11, 2010, 11:49:22 am »
A quick (and dirty) fix:
open ps_product_custom-type.php.
Search for
Code: [Select]
         $price_with_tax=$CURRENCY_DISPLAY->getFullValue(number_format($price * (1 + $tax_rate),2));Replace with
Code: [Select]
           $price_with_tax=$CURRENCY_DISPLAY->getFullValue($price * (1 + $tax_rate));this removes the price conversion to 2 digit decimals.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

geovladimir

  • Beginner
  • *
  • Posts: 5
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #451 on: October 11, 2010, 12:04:42 pm »
Yes! Thanks! Now does not cut. But in a basket to put does not give!

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: Custom Attributes Extended 2.1 [Hack]
« Reply #452 on: October 11, 2010, 12:27:37 pm »
That must be some other thing, anyway, your syntax is a bit faulty: the |'s are mandatory!
try to use
Code: [Select]
OAF (checkbox) (|) (Widows [+123456.00], Orphans [+126455.00])with this syntax works for me!
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: Custom Attributes Extended 2.1 [Hack]
« Reply #453 on: October 11, 2010, 12:51:42 pm »
Hack updated with the fix above, and also a new attribute added - now you can add headings within attributes, like there: http://www.kadkitchenandbedroom.co.uk/
Read the added TXT file available in the package on how to use it! As I will have time, I can promise an update to the PDF too, but I'm still busy to make some money needed to survive  :-\.
You can download it, still free of charge from this location:
http://www.webgobe.ro/en/downloads/component-hacks.html
Any feedback - and any small amount donated - is highly appreciated! (See below  the link if you want to donate.)
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

geovladimir

  • Beginner
  • *
  • Posts: 5
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #454 on: October 11, 2010, 13:43:29 pm »
That must be some other thing, anyway, your syntax is a bit faulty: the |'s are mandatory!
No, the reason not a symbol |. Without this symbol too all works. The matter is that I used in syntax of a word in Russian. It hack does not accept. It is very a pity. :'(

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: Custom Attributes Extended 2.1 [Hack]
« Reply #455 on: October 18, 2010, 08:45:28 am »
Guys, a problem discovered in the CAE, see this post:
http://forum.virtuemart.net/index.php?topic=77119.msg256770#msg256770
The problem is fixed in the version available on my site, if you think your site may be affected, then re-download it, and upgrade your ps_product.php.
The bug affects only sites which are using child products and shopper group discounts - so may be only a few sites having this problem.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

koaconsulting

  • Beginner
  • *
  • Posts: 19
    • Website Design, Development, and Internet Marketing Solutions
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #456 on: October 20, 2010, 00:32:21 am »
Overall this really seems like a great mod, however we cannot get it to work now that we've upgraded to your most recent version.  Once you click the "Add to Cart" button we just get a blank page with no error message or code generated.

We are using the newest stable version of Virtuemart (1.1.5) and the files you have in your zip file are from a MUCH older version of VM.  Is there any chance you can migrate the mod over to Virtuemart 1.1.5?

For example I'm looking at the ps_product.php file.  The version you include says "@version $Id: ps_product.php 1599 2009-01-08 19:05:51Z soeren_nb $" and the version in the latest VM release says "@version $Id: ps_product.php 2286 2010-02-01 15:28:00Z soeren_nb $".  A LOT has changed in your modified files in the past year and I have a feeling the problems we're having are related to us trying to port over pieces of the code.

We could really use your functionality but it just doesn't seem to work with VM 1.1.5.  Anything you can do to help would be greatly appreciated.

Note: after tracing through the code it seems to hang while recursively making the following call (ps_product_attribute.php):

$_SESSION['charge'][$d['prod_id']]=$charge;

Also the custom attribute text we are using is the following:
Code: [Select]
Invitation(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Invitation Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Response(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Response Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Details Insert(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Details Insert Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Custom Map(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Custom Map Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Color(select-r)(|)(Sand & Colbalt,Lime & Graphite,Mist & Graphite);Event Date(date);Cost(number)(|)(1|1)

Thank you.
KOA Consulting is dedicated to providing high quality, professional website design, development, graphic design, Internet marketing, search engine optimization (SEO), and a variety of cutting edge web technologies to our ever-growing client-base. Our long list of satisfied clients extends across the globe.

We specialize in working with the Joomla Content Management System and custom integration of Virtuemart as well. 

Please contact us for all of your custom web design and development needs: www.koaconsulting.com

iskye81

  • Beginner
  • *
  • Posts: 26
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #457 on: November 17, 2010, 16:54:50 pm »
Not too much. The entire hack relies on  commas, semicolons, pipes and other valid PHP  delimiters and special characters. The situation isn't hopeless, in the moment of capture the entered text can be "prepared" with some coding skills. But isn't a 2 click thing, because the text entered this way will be passed around, including in the cart, and must to remain comprehensive. But if you want to take the risk, here's the code you must change:
Locate the * Text element class in the code (around line 757 if you use the latest version.
Go to function customTypeProcess, beginning at line 820.
The current, collected string is in the variable $value. see how is processed, and eliminate the failure points.
If you reach a stable solution, let us know!
I'll be happy to include in the package.
BTW, you should do the same for the textarea class too!

Hi again, well I'm afraid this is completely beyond me with my php experience at the moment.  If anyone comes up with a solution for this do let me know.  In the meantime I'm going to have to stick with the rather crude workaround of telling customers not to include certain characters in the submitted text.

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: Custom Attributes Extended 2.1 [Hack]
« Reply #458 on: November 17, 2010, 17:53:07 pm »
Overall this really seems like a great mod, however we cannot get it to work now that we've upgraded to your most recent version.  Once you click the "Add to Cart" button we just get a blank page with no error message or code generated.
Try to use some example syntax to see if it's working. Often a minor syntax error in the custom attributes can wreac havoc. The code has no protection against typos, reserved PHP characters and other such things.
Is a HACK - result of cumulative work of 10+ people. No guarantees ;)
We are using the newest stable version of Virtuemart (1.1.5) and the files you have in your zip file are from a MUCH older version of VM.  Is there any chance you can migrate the mod over to Virtuemart 1.1.5?

For example I'm looking at the ps_product.php file.  The version you include says "@version $Id: ps_product.php 1599 2009-01-08 19:05:51Z soeren_nb $" and the version in the latest VM release says "@version $Id: ps_product.php 2286 2010-02-01 15:28:00Z soeren_nb $".  A LOT has changed in your modified files in the past year and I have a feeling the problems we're having are related to us trying to port over pieces of the code.

We could really use your functionality but it just doesn't seem to work with VM 1.1.5.  Anything you can do to help would be greatly appreciated.
Two things: a. - the most important - code is working with newer VM, I have at least 10 sites with the code you can download on top of VM 1.1.5.
b. - If I will have the time - or I will got a project wich implies the upgrade to 1.1.5 - I will port he hack over 1.1.5 too, and you - and all other VM people - will get it for free.
But as is right now, I guess you must wait for that. I'm living EXCLUSIVELY from freelancing. I need to put first of all milk and bread on the table. Then I can code for fun (and I will).
Note: after tracing through the code it seems to hang while recursively making the following call (ps_product_attribute.php):

$_SESSION['charge'][$d['prod_id']]=$charge;

Also the custom attribute text we are using is the following:
Code: [Select]
Invitation(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Invitation Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Response(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Response Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Details Insert(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Details Insert Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Custom Map(select)(|)(Digital,1-Color Letterpress,2-Color Letterpress,3-Color Letterpress,4-Color Letterpress);Custom Map Quantity(select)(|)(0,50*,75,100,125,150,175,200,225,250,275,300);Color(select-r)(|)(Sand & Colbalt,Lime & Graphite,Mist & Graphite);Event Date(date);Cost(number)(|)(1|1)
Weird. Your custom attribute works perfect on a fresly baked Joomla 1.5.22 with latest VM 1.1.5 and the hack downloaded from my page and applied to the above mix.
Did you overwrote everything? Do you use the default VM template? If not, you must hack the VM template you use too!!
These are the most common problems.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

kasssim

  • Beginner
  • *
  • Posts: 35
  • Tanzania Safari Speshitpillt
    • Tanzania Safaris with Bobby Tours
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #459 on: January 07, 2011, 08:43:59 am »
please advise if this hack is working and where can i download it from ?

thanks

i want a Custom Attribute List showing a calendar
Tanzania Safari Speshitpillt
www.bobbytours.com

kasssim

  • Beginner
  • *
  • Posts: 35
  • Tanzania Safari Speshitpillt
    • Tanzania Safaris with Bobby Tours
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #460 on: January 07, 2011, 09:17:52 am »
thanks for the reply,

which one should i download as there are 2 mentioned.

can you also advise steps or should i follow the ones listed on the start of this post ?
Tanzania Safari Speshitpillt
www.bobbytours.com

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: Custom Attributes Extended 2.1 [Hack]
« Reply #461 on: January 07, 2011, 13:02:39 pm »
The one WITHOUTH "window blinds, windowsill" etc in his name - that's the more recent.
You need to upload the content of the package to your server and OVERWRITE the existing files. Files are arranged as they are in the server, so it's a simple step. Overwriting everything is mandatory. Documentation is also in the package.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

kasssim

  • Beginner
  • *
  • Posts: 35
  • Tanzania Safari Speshitpillt
    • Tanzania Safaris with Bobby Tours
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #462 on: January 07, 2011, 14:22:53 pm »
from your site am not getting the activation link
Tanzania Safari Speshitpillt
www.bobbytours.com

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: Custom Attributes Extended 2.1 [Hack]
« Reply #463 on: January 10, 2011, 09:49:18 am »
For everyone interested in the hack: check this thread, please!
http://forum.virtuemart.net/index.php?topic=39666
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

luckysoft

  • Beginner
  • *
  • Posts: 19
Re: Custom Attributes Extended 2.1 [Hack]
« Reply #464 on: January 13, 2011, 13:13:27 pm »
Hello all,
I have read all posts about this hack but can't find a solution to my problem :(

The problem starts when a product has two or more attributes, when i select one attribute and than hit the "add to cart" button it works well, but when I select two different attributes (not within the same attribute) I'm not able to add the product to the cart.

The strange part is that it works the first time i visit the site, but after that no more :(

This is what i have done:

attribute 1(checkbox)(tip here|title-hover)(option 1 [+5.00],option 2 [+10.00]);
attribute 2(checkbox)(tip here|title-hover)(option 3 [+5.00],option 4 [+10.00])

When i remove the cookie from my browser i can select all the options/attributes and add the product to my cart once, after that I'm not able to, only if i select one or two options within the same attribute.









I'm really hoping that someone here has a solution for me, I'm desparate :):)