Product Details after checkout!

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18455

I m using Hikashop in joomla 1.6.I am having an extra cost on user choice which adds to the product full price. i am succesful in getting user response from a drop down where in user can say yes or no to extra cost. Depending upon that extra cost gets added to real price. but i am stuck now as after checkout(Authorize.net) the product details are displayed i want to add that extra cost there also...I m succesfull in inserting it to order_product table.
please guide where to edit the cost so that in biiling cost that extra cost can be displayed. and
$order_product_total_price =($product->order_product_price+$product->order_product_support)*$product->order_product_quantity;
please ang guide properly as i m new to MVC structure.
thnks

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18457

If you use the latest version of HikaShop, the total price calculation can be overriden via a joomla system plugin implementing the override functions as explained in :
www.hikashop.com/support/documentation/6...tation.html#override

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18506

Thanks alot for reply..but creating new custom field only create it in address table....
..(screen shot attched)... where to create custom field in product n cart table...according to suggestion u gave....

but the way i m moving is with out layout override manually have created filed in db product , cart, order table n have changed insert,Update queries accordingly at every step. just stuck in last ..which function of authorize.php is taking values from order table to payement url defined in plugin. sending u next screenshot of the detail page where i want to add extra cost and display it with an extra coloumn there also so that customer knows how much is bieng added to final total. plz help project is on dead line.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18507

here goes screenshot of where i want to display on extra filed which is extra cost. plz guide properly told u im fresh wd cake php structure. n chnges i told you in my earlier msg are breaking cart functionality somewhere wch is i am aware of and will come in testing phase.
thnkx alot

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18508

have upgraded to new version...help-> update ...downloaded n installed without uninstalling ealier one. it showed version at the footer 'HikaShop Starter 1.5.1, Joomla!™ Shopping Cart Extension' but cant notice custom filed chnge...is that the right way to upgrade..? thnkx

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18513

Custom fields of the table "item" are only available in the Business edition of HikaShop. Upgrading means going from one edition to another. Updating means going form one version of an edition to another.
So you have the latest version of the Starter edition which doesn't enable you to do that. That's normal. You can get the Business edition on that page: www.hikashop.com/en/hikashop/business.html

HikaShop gets the information from the order and sends it to authorize.net in the function onAfterOrderConfirm, so that's the one you're looking for.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18593

thkns,
Sorry but order table has my value i somehow found that, and onAfterOrderConfirm function too ...but where only five values are printed...on payement page...
thnks

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18598

I don't understand your problem. Could you explain more ?

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18689

Hello,
Screen shot for authorize.net in previous post has the product information like description,product name,qty..etc. i want to know that from where this data is going? which is the file....data coming from order table i know but it has lot more fields...how it is sending only these 5 fields...i will add my extra cost there ...as i have it in order table....

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18707

That's an authorize.net page. You can't change the number of columns. The data of these lines are generated in the function _loadStandardVars in the foreach: foreach($order->cart->products as $product){
on the line:
$vars["x_line_item"][]=substr($product->order_product_code,0,30).'<|>'.substr($product->order_product_name,0,30).'<|><|>'.$product->order_product_quantity.'<|>'.round($product->order_product_price,(int)$currency->currency_locale).'<|>'.$has_tax;

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18713

it shows no effect if i add my value..tried commenting that code than also it takes data....

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18724

If you remove that line, it's impossible that authorize display the order details as it won't know it.

You can't just add new info at the end... You need to add your data in the existing fields. Authorize.net does not allow you to add new columns to that table. We can't do nothing about that.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18726

Thankx.... added my value to total...again where is this total price in screenshot....either guide to remove it or edit as above...total

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18730

The total is set in the line:
"x_amount" => round($order->cart->full_total->prices[0]->price_value_with_tax,(int)$currency->currency_locale),

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18735

Thanks
tried adding static value here...
"x_amount" => round($order->cart->full_total->prices[0]->price_value_with_tax+'10',(int)$currency->currency_locale)

no resluts...my value is here $product->cart_product_support ;

guide how to add it so that is shows in total....have used same to add extra cost in items total..

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18741

$product does not exists there since you're not in a products foreach. You need to calculate the total of your products support price before that, and then add it to the total.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18798

i am unable to add to calculate it ....either explain where to add or just remove it as total is displayed above no need for it again....plzz
have added in classes/order.php like this

$order->products[$k]->order_product_total_price_no_vat = ($product->order_product_price+$product->order_product_support)*$product->order_product_quantity;
i cn see in cart.php & currenct.php total is calcualting don't know where to add exactly...

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18799

how order table is getting values can't find insert query for it..

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
13 years 6 months ago #18830

You should do like that:
$support = 0;
foreach($order->cart->products as $product){
$support+=$product->order_product_support;
}
at the beginning of the function _loadStandardVars

Then you could simply have:
"x_amount" => round($order->cart->full_total->prices[0]->price_value_with_tax+$support,(int)$currency->currency_locale),

There is no insert query for data in HikaShop. It's done automatically with the hikashopClass class functions in administrator/components/com_hikashop/helpers/helper.php. The data of the order is given to it in components/com_hikashop/controllers/checkout.php in the function after_confirm.

Please Log in or Create an account to join the conversation.

  • Posts: 23
  • Thank you received: 0
13 years 6 months ago #18836

order_product_support
this field is in order_product
not in order table
will the code u gave will work fine

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum