Post by Mountune » Wed Apr 19, 2017 9:25 pm

Hello,
Is there a easy way of adding a manual option for cost price, postage and RRP into the product data field (ideally above price) which wont appear in the front end?

This will make it easier when I export/import my product list for price changes etc and also means its all stored in 1 document rather then various

Thanks

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Thu Apr 20, 2017 5:32 pm

anyone able to shed some light?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by artcore » Thu Apr 20, 2017 6:49 pm

Why not use the unused fields such as 'location' and EAN for example.
You can rename them in the language file for easier understanding ->admin>language>en-gb->catalog>product.php

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Mountune » Sat Apr 22, 2017 4:55 pm

Hi Artcore,

Fantastic idea (I checked the comparison and product pages and obviously SKU / EAN / Location etc is not displayed.

anyhow I changed the Location to Cost Price in Product.php (2 lines) and when editing a product it says "entry_location" rather then cost price.

Any ideas?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by artcore » Sat Apr 22, 2017 6:28 pm

Did you change $_['entry_location'] = 'Location'; to $_['entry_location'] = 'Cost Price'; in exactly that way? Than it should work but maybe you need to refresh ocmod cache.
As for displaying the other columns to the product.tpl, see attached changes to controller/product/product.php
You can echo them in the tpl by using <?php echo $cost_price; ?> for example
A currency formatted output can be done like this:
$data['cost_price'] = $this->currency->format($product_info['location'], $this->session->data['currency']); But you can just write $100.00 in the location field of course if you have one language/currency

Attachments

Screenshot_2017-04-22-12-23-31.jpg

Screenshot_2017-04-22-12-23-31.jpg (554.85 KiB) Viewed 930 times


Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by Mountune » Wed Apr 26, 2017 8:20 pm

thanks again for the response..

I replaced both with costprice like a fool...Works now and I appreciate the picture and adding new fields :)

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by artcore » Wed Apr 26, 2017 8:48 pm

You're welcome! Enjoy ;)

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 39 guests