Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Help with $products_name

    OK guys, someone please help me out here as I've been struggling with this code for ages now. I'm working on a code that uploads my products to Twitter and I want it to post the products name followed by the products_price and finally the tiny url.... every time I add a product to the site.

    The Code I'm using is working for the price and the tiny url but I cannot for the life of me get the products name to display... what $ must I use for it to display the products name because $products_name just will not work!! I've tried $products_name, $productname and $ProductName but just cannot get it to display...

    $message = $products_name . ' £' . $products_price . ' ' . $tinyPurl;

    Can anyone help please??

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Help with $products_name

    $products_name seems to be the correct variable . now i don't know what script you are using . but question is this .
    dose that script has sql command to query database for product info that you wish to upload to twitter ? if so , dose it look for products name ? if there is sql command in the script , chance are is not retrieving products name from table.

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Help with $products_name

    Hi Tony,

    Thanks for the reply... I should have updated this as I found the answer. The problem with the product name is that it is language dependant. So there is no simple variable holding it.

    However I accessed the name in the default language using:

    $_POST['products_name'][$_SESSION['languages_id']]

    Now, works a treat... All my new products are uploading to Twitter as soon as they're activated.... It adds the product name, the price and then the tiny URL. Perfecto!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Help with $products_name

    Quote Originally Posted by limelites View Post
    Thanks for the reply... I should have updated this as I found the answer.
    MODERATOR NOTE: You wouldn't have to keep track of so many separate threads if you kept all your related questions in just one thread in the first place.
    Instead, you have multiple disjointed questions related to the same topic sitting in multiple places. 4 separate discussions on the same topic at the present time.
    That's why double-posting the same thing in several places is discouraged.
    It makes it hard on people who are looking for answers and don't find completed discussions, and also on volunteers who *give* answers, esp when they've already answered the same question elsewhere.

    http://www.zen-cart.com/forum/faq.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. question marks (?) on products_name and products_description
    By genesissystem in forum Upgrading to 1.5.x
    Replies: 8
    Last Post: 31 Jan 2013, 01:50 AM
  2. new_products.php - replacing $new_products->fields['products_name'] with manufacturer
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Mar 2009, 10:18 PM
  3. Need to include Manufacturer in orders products_name
    By stride-r in forum Managing Customers and Orders
    Replies: 0
    Last Post: 2 Feb 2009, 02:56 PM
  4. $products_name on tpl_product_reviews_default.php
    By Alex Clarke in forum General Questions
    Replies: 2
    Last Post: 19 Sep 2007, 09:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg