| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Accessing product info via SKU on a Static page | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi all,
I would like to know how I could go about setting up a static page which would pull various product(s) data based on its sku number. Is this possible? If so, please reply with some sample code. Thanks in advance.
__________________
4.1.10 |
|||||||
#2
|
|||||||
|
|||||||
![]() Not sure I follow...you have a static page...and you want the customer to be able to enter a sku number or....?
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() I guess what I'm asking is that I wish to create my own static php pages such as:
/store/shoes.php where shoes.php will call my navigation / header / footer templates, but in the main content section I wish to have some sort of code that would pull specified product data (two specific shoes) from the database based on which sku numbers are embedded in the php code. so the php code for that would be: func_display("customer/header.tpl",$smarty); func_display("customer/navMenu.tpl",$smarty); var $arrProductsForDisplay = getProductsForDisplay('sku1111', 'sku1112'); foreach($arrProductsForDisplay as $product){ echo 'Product ID:' . $product{"productid"]; .... } func_display("customer/footer.tpl",$smarty); --- So the sku numbers would be hardcoded into the static page, and the "getProductsForDisplay()" function would grab all the product information I would need, but I need to figure out how to create that getProductsForDisplay() function which would query the x_cart database and give me product objects. If there's something that already exists for me to do that, great. If not, how would I go about doing this within the x-cart file structure (ie. where/how to create the function) ? To sum up, how do I create a page which I can pull data from the x-cart database which isn't based on the productid, but rather the sku numbers which would be hardcoded into the php code. Hope that made a little more sense, and again, thanks for the help in advance.
__________________
4.1.10 |
|||||||
|
|||
X-Cart forums © 2001-2020
|