Post by mdfarukh » Sun Dec 22, 2019 8:09 pm

Hello, i have some custom code in my opencart 3 website and i want to change my website theme Journal 3 but i confused how to add my previous website custom code to Journal 3.

my code
catalog/controller/checkout/confirm.php

Code: Select all

		
            //-----------------------------------------------------Custom Code
			$total_owner_profit = 0;
			$total_customer_profit = 0;
            //-----------------------------------------------------custom Code
		

				//-----------------------------------------------------Custom Code

				$this->load->model('catalog/product');
				$product_info = $this->model_catalog_product->getProduct($product['product_id']);
				$this->load->model('account/customer');
				$customer_info = $this->model_account_customer->getCustomer($this->customer->getId());


				$owner_profit = 0;
				$customer_profit = 0;

				if($product_info['base_price'])
				{
					if($customer_info['parent_id'] || $customer_info['customer_group_id']==2 || $customer_info['customer_group_id']==3 || $customer_info['customer_group_id']==4)
					{
					
						$retailer_profit = ($product['price']-$product_info['base_price'])*$product['quantity'];
						$customer_profit = ($retailer_profit*70/100);
							$owner_profit = ($retailer_profit*30/100);
					}

				}

				$total_owner_profit+= $owner_profit;
				$total_customer_profit+= $customer_profit;
				$total_shipping_price+= $shipping_price;
				//-----------------------------------------------------Custom Code


					//-----------------------------------------------------Custom Code

					'base_price' 		=> $product_info['base_price'],
					'shipping_price'    => $product_info['shipping_price'],
					'owner_profit' 		=> $owner_profit,
					'customer_profit' 	=> $customer_profit,

					//-----------------------------------------------------Custom Code


            //-----------------------------------------------------Custom Code
			$order_data['total_owner_profit'] = $total_owner_profit;
			$order_data['total_customer_profit'] = $total_customer_profit;
			$order_data['total_shipping_price'] = $total_shipping_price;
			
			//-----------------------------------------------------Custom Code



Newbie

Posts

Joined
Tue Nov 14, 2017 11:07 am

Post by JNeuhoff » Sun Dec 22, 2019 10:22 pm

This is an OpenCart forum, Journal3 is a commercial extension, so you should get in touch with the Journal support on this.

Is there any reason why you need to replace the OpenCart checkout at all? The OpenCart checkout works just fine.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Mon Dec 23, 2019 6:44 pm

mdfarukh wrote:
Sun Dec 22, 2019 8:09 pm
i want to change my website theme Journal 3
Please, don't do it.

Here's why: viewtopic.php?t=157098

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 5 guests