Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. QUESTION Related PHP + OSCOMMERCE

QUESTION Related PHP + OSCOMMERCE

Scheduled Pinned Locked Moved Web Development
phpdata-structureshelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Waqas Butt
    wrote on last edited by
    #1

    Hi, Please help me, i want to display stock status on the main page (New Product section) with price condition. I have two conditions 1- if QTY is ==0 than display [b]"Out of Stock"[/b] and if QTY>0 than display [b]"In Stock"[/b] 2- if Price is ==0 than display [b] "Call 4 Price" and if price is >0 than display [b]"Product Price"[/b]. Now I have writing a code, which is not working properly can anybody help out. here is my code: if($new_products['products_quantity'] == 0)// or $product_info['products_quantity'] = 0) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '[' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '](' . tep_href_link\(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']\) . ') [' . $new_products['products_name'] . '](' . tep_href_link\(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']\) . ') **'.TEXT_PRODCUT_OUT_OF_STOCK.'('. $new_products['products_quantity'].')** ' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); } else if($new_products['products_price'] == 0)// or $product_info['products_quantity'] = 0) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '[' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '](' . tep_href_link\(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']\) . ') [' . $new_products['products_name'] . '](' . tep_href_link\(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']\) . ') **'. TEXT_PRODUCT_IN_STOCK.'('.$new_products['products_quantity'].')** '.TEXT_CALL_FOR_PRICE);//TEXT_PRODCUT_OUT_OF_STOCK } else { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '[' . tep_im](' . tep_href_link\(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']\) . ')****

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups