support

Author Topic: sku problem  (Read 12501 times)

Offline ygalbrami

  • Full Member
  • ***
  • Posts: 128
  • Karma: +9/-2
    • View Profile
sku problem
« on: April 12, 2013, 07:22:25 AM »
hello,
i need help,
when a buyer make an order - i get an email with all the detail of items he buy
i need in this email to see the sku, but i don't know how to do that

i have see that when buyer make an order it will post the order to the database in ab_order_products
now i have added a sku row and i have added
this line -  sku = '" . $this->db->escape($product['sku']) . "',
on the order.php file
but the sku don't send to the database and i really need any help.

thanks

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4367
  • Karma: +302/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: sku problem
« Reply #1 on: April 16, 2013, 06:35:04 AM »
I assume you edit admin section. There is no array $product in order.php now. There is $this->data['products']
You can use echo_array($product); function to get content of the array.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline ygalbrami

  • Full Member
  • ***
  • Posts: 128
  • Karma: +9/-2
    • View Profile
Re: sku problem
« Reply #2 on: April 16, 2013, 07:53:51 AM »
i need help to get the sku row that in ab_products table
so when i will press on the admin panel - sales - order and i will press on invoice i will see the sku in the rows of the products
i have try to insert some code in the order_invoice.tpl but no luck

can you please please help me?

thank you

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4367
  • Karma: +302/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: sku problem
« Reply #3 on: April 16, 2013, 11:54:59 AM »
Please post the snippet of the code you try to edit.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline ygalbrami

  • Full Member
  • ***
  • Posts: 128
  • Karma: +9/-2
    • View Profile
Re: sku problem
« Reply #4 on: April 17, 2013, 02:27:27 PM »
ok now it's work and i do it all by myself

on the file - order_confirm.tpl

i make some change.

before the line --
Code: [Select]
foreach ($products as $product) {
i have put this lines :

Code: [Select]
$connect_this = mysql_connect("sql_server", "user_name", "password") or die("error connect");
$mysql_db = mysql_select_db("my_db")or die("error db");
$get_orderid = $order['order_id'];

$select_ab_order_products = mysql_query ("SELECT * FROM ab_order_products INNER JOIN ab_products ON ab_order_products.product_id = ab_products.product_id WHERE ab_order_products.order_id='$order_id'") or die ("can't select");

and after this line:
Code: [Select]
foreach ($products as $product) {i put this line:
Code: [Select]
$get_row_product_id = mysql_fetch_array ($select_ab_order_products);
and before that line :
Code: [Select]
<td align="left"><?php echo $product'model' ]; ?></td>i insert this to get the data: 
Code: [Select]
<td align="left"><?php echo $get_row_product_id['sku']; ?></td>
and this work, when a buyers make an order i will see the sku of the items he buy.

and i did the same in the invoice file in admin panel (order_invoice.tpl)

but why this not come in the system? if i can't see the sku anywhere so for what is there?


   


Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4367
  • Karma: +302/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: sku problem
« Reply #5 on: April 18, 2013, 07:23:22 AM »
I do not understand the problem. Do you see SKU in product edit section?

FYI.
I suggest to use abantecart API to connect to database.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline ygalbrami

  • Full Member
  • ***
  • Posts: 128
  • Karma: +9/-2
    • View Profile
Re: sku problem
« Reply #6 on: April 19, 2013, 04:17:18 AM »
I have need to see the sku when buyer make and order and to see it on invoice.

now i do it and i make some change

 

Powered by SMFPacks Social Login Mod