Download & Extend

getting syntax error after instilling and it is not deducting any thing from price.

Project:Ubercart Custom Price
Version:7.x-1.x-dev
Component:Code
Category:support request
Priority:major
Assigned:Unassigned
Status:postponed (maintainer needs more info)

Issue Summary

Parse error: syntax error, unexpected '[' in /Fakelocation/PlatinumTheatrecompany/sites/all/modules/uc_custom_price/uc_custom_price.module(72) : eval()'d code on line 3

I have looked around and saw some one ask about php5.3x I am currently using php5.2.17 is this what could be causing the issue?

Comments

#1

Category:bug report» support request
Status:active» postponed (maintainer needs more info)

That 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.

#2

I 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 error

and yes i have cost set at a value as well.

#3

Did 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.

#4

you know i totally missed that when searching for my issues thanks for the help and the link.

#5

Hey 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.

#6

I'm still getting that error as well TR. Whenever I add [ to custom price I get a syntax error.

nobody click here