Closed (fixed)
Project:
Ubercart Custom Price
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 May 2011 at 03:11 UTC
Updated:
20 Jun 2012 at 20:23 UTC
I'm having trouble using this module with tokens. I tried using this code
$item->price = $item->price;
$item->price = [cost] * 1.1;
But i get the follwing error.
Parse error: syntax error, unexpected '[' in /home/jadamsfx/public_html/nueera.com/sites/all/modules/uc_custom_price/uc_custom_price.module(87) : eval()'d code on line 1
Any ideas?
Comments
Comment #1
tr commentedToken is part of core Drupal in Drupal 7, and the syntax for tokens has changed. The proper token for product cost is [node:cost] in Drupal 7.
Comment #2
jadamsfx commentedHmm I'm still getting the same error when I change the custom price field to...
I applied this patch here http://drupal.org/node/1165618
Comment #3
jadamsfx commentedAny Ideas?
Comment #5
jawi commentedCustom prices don't show up.
When used
$item->price = [cost] * 1.1;
This error shows up:
Parse error: syntax error, unexpected '[' in /home/idc/domains/~~~~/modules/uc_custom_price/uc_custom_price.module(87) : eval()'d code on line 3
HELP
Comment #6
tr commentedAlready answered in #1