WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Ndizi] Throwing strange PHP errors when customizing (2 posts)

  1. RootsCulturalCommunications
    Member
    Posted 3 years ago #

    I'm trying to customize the Ndizi Project Management plug-in to suit a client's needs. I'm new to PHP, but fairly savvy and completely stumped by this.

    WordPress started throwing the error:

    Parse error: syntax error, unexpected '"' in /home/incredib/public_html/salesreps/wp-content/plugins/ndizi-project-management/Ndizi.class.php on line 43

    After changing line 43 from

    var $project_fields = "
    p.id AS project_id,
    p.client_id AS project_client_id,
    p.name AS project_name,
    p.description AS project_description,
    p.active AS project_active,
    p.modified AS project_modified";

    to

    var $order_fields = "
    o.id AS order_id,
    o.cust_id AS order_customer_id,
    o.date AS order_date,
    o.shipping AS shipping_method,
    o.payment AS 'payment_method',
    o.i420dlx AS 'i420_deluxe',
    o.i420csls AS 'i420_caseless',
    o.m420 AS 'm420',
    o.m420xlec AS 'm420_expansion_chambers'
    o.i420ec AS 'i420_expansion_chambers'
    o.i420glss AS 'i420_replacement_glass_pair'
    o.i420prts AS 'i420_parts_kit'
    o.m420prts AS 'm420_parts_kit'
    o.tshirts AS 'tshirts'
    o.decals AS 'decals'
    o.sub AS 'order_subtotal'
    o.ship AS 'order_shipping'
    o.total AS 'order_total'
    o.track AS 'order_tracking_number'
    o.active AS order_active,
    o.modified AS order_modified";

  2. Well, you've got a couple problems in your code there ... firstly, you're using single quotes, instead of backticks. To encapsulate field names and the like, use ` not '

    Also, you're missing commas between many of the fields.

    I'd need to see the actual Ndizi.class.php to debug it -- it may actually be on a different section in the code, possibly missing a semicolon or the like. Email me the file and I'll take a quick look at it. George@Stephanis.info

Topic Closed

This topic has been closed to new replies.

About this Topic