Postponed (maintainer needs more info)
Project:
Ubercart Custom Price
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2011 at 18:02 UTC
Updated:
21 Jan 2013 at 22:57 UTC
Comments
Comment #1
tr commentedThat error is an error in the custom price code that *you* entered, not an error with the module. If you post your code perhaps we can help you figure out what you did wrong.
Comment #2
farnsworth commentedI had coppied the code from the the module page it self. after reading your comment i replaced it all with $item->price = $item->price;
which was default correct? I am still getting the error with the default code in place.
Also the only place i can and or change it is in store/custom price correct?
I see a CUSTOM PRICE CALCULATION box on the product page but that does not drop down or do any thing.
The site I am working on is for a non profit 60+ theatre company here in minneapolis. Which i am not charging a dime for. so any help getting this working would be great. if needed i can PM you a username and password.
Thanks for all your help.
Edit:
Ok i got the module working correctly in products now not sure why it would not before. so every time i add
$item->price = $item->price;if ($item->qty > 5) {
$item->price = [cost] * 1.1;
}
To an item i get that error if i use
$item->price = $item->price;I do not get the errorand yes i have cost set at a value as well.
Comment #3
tr commentedDid you read #1165630: Cant Use token in price calculation.?
Tokens in Drupal have a different syntax in Drupal 7 than they did in Drupal 6. The project page examples are for Drupal 6.
Comment #4
farnsworth commentedyou know i totally missed that when searching for my issues thanks for the help and the link.
Comment #5
farnsworth commentedHey i have done all the updates and the patches as suggested, I am still having some issues and i assume it is in how i am putting the php in. Could you please give me a proper example any thing i do more then $item->price = $item->price; = syntax error for me. I am sure i am missing something simple on this but thanks for the help.
Comment #6
jadamsfx commentedI'm still getting that error as well TR. Whenever I add [ to custom price I get a syntax error.
Comment #7
VanillaFrog commentedI get a similar error. (using drupal 7.19 and ubercart 3.3)
Parse error: syntax error, unexpected '[' in /home/aussport/public_html/electronic/sites/all/modules/uc_custom_price/uc_custom_price.module(87) : eval()'d code on line 2
I have not entered any custom code at all apart from the default: $item->price = $item->price;
Any assistance would be appreciated. The website is supposed to be live on the 1st of February, I somehow doubt that will happen ;)