Post by aljawaid » Fri May 29, 2015 10:23 pm

would this work on v2.0.2? Showing SKU from cart to checkout to order emails?

Total e-commerce newbie bravely testing OC v2.0.3.1 before rolling it live...getting there slowly, somehow. Maybe not. I dunno.


Active Member

Posts

Joined
Fri Oct 10, 2014 10:33 pm
Location - UK

Post by gtoc » Sat May 30, 2015 6:09 pm

Hi, this is working great for me on 1.5.5.1, can someone please help me with an sql query to get info from the oc_product_option_value 'price' column. I am trying to get this info on my invoice and struggling with the right query.

thanks

New member

Posts

Joined
Tue Apr 23, 2013 12:11 pm

Post by johnp » Fri Jan 31, 2020 5:05 am

hamidg84 wrote:
Wed Feb 12, 2014 7:17 am
Hi

It says Warning: VQMod script XML syntax is invalid!

Can you please help?
I've tweaked the VQMOD code and it works fine on 1.5.6.4.

I would like to make the SKU only show for wholesale group members. Can anyone suggest how to hide items on the invoice by customer group? If say the wholesale group ID = 2. Any ideas how to achieve it?

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by straightlight » Fri Jan 31, 2020 5:54 am

johnp wrote:
Fri Jan 31, 2020 5:05 am
hamidg84 wrote:
Wed Feb 12, 2014 7:17 am
Hi

It says Warning: VQMod script XML syntax is invalid!

Can you please help?
I've tweaked the VQMOD code and it works fine on 1.5.6.4.

I would like to make the SKU only show for wholesale group members. Can anyone suggest how to hide items on the invoice by customer group? If say the wholesale group ID = 2. Any ideas how to achieve it?
Followed from this post: viewtopic.php?f=20&t=47839&p=467219#p503666 , in admin/controller/sale/order.php file, find:

Code: Select all

'telephone'          => $order_info['telephone'],
add above:

Code: Select all

'customer_group_id'  => $order_info['customer_group_id'],
Then, in your admin/view/template/sale/order_invoice.tpl file,

find:

Code: Select all

<?php foreach ($orders as $order) { ?>     
add above:

Code: Select all

<?php $customer_group_matches = array(1, 2, 3, 4, 5); ?>
Where 1 to 5 may need to be replaced by the customer group IDs you want to use.

Then, find:

Code: Select all

<td><b><?php echo $column_sku; ?></b></td>
replace with:

Code: Select all

<td>
	<?php if (in_array($order['customer_group_id'], $customer_group_matches)) { ?>
      		<b><?php echo $column_sku; ?></b>
	<?php } ?>
      </td>
Then, find:

Code: Select all

<td><?php echo $product['sku']; ?></td>
replace with:

Code: Select all

<td>
	<?php if (in_array($order['customer_group_id'], $customer_group_matches)) { ?>
		<?php echo $product['sku']; ?>
	<?php } ?>
      </td>
This should provide what you need.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by johnp » Fri Jan 31, 2020 6:02 am

Top man. Thanks Straightlight. I'll try that out tomorrow. :)

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD 2.6.1 lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK
Who is online

Users browsing this forum: No registered users and 38 guests