Don't send costs to vendor

  • Posts: 57
  • Thank you received: 1
8 years 3 months ago #246313

-- HikaShop version -- : HikaShop Business: 2.6.3
-- HikaMarket version -- : 1.7.0
-- Joomla version -- : 3.6
-- PHP version -- : 5.6
-- Browser(s) name and version -- : Firefox 46

Hey,

How can I send a vendor only the shipping address and the products ordererd without showing any prices at all?

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 months ago #246317

Hi,

There is no ACL to remove the prices from the order (and the email).
So it would require a view override and an email override to perform such kind of customization.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 66
  • Thank you received: 1
8 years 3 months ago #246333

Thanks Jerome

Any tips on how to create those overrides?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 months ago #246334

Hi,

Sure !

Here the documentation/explanation for the view/layout overrides :
www.hikashop.com/support/documentation/1...-display.html#layout
The HikaMarket views are also editable in the HikaShop view interface.

Here the documentation for the email edition (requires HikaShop Business) :
www.hikashop.com/support/documentation/i...shop-email-form.html
The HikaMarket emails will also be listed in the backend email listing.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 57
  • Thank you received: 1
8 years 3 months ago #246419

Hey Jerome,

Thanks - found the overrides ;)

I can see that the tag for showing the custom fields is {TXT:ADDITIONAL_INFORMATION}

What if I want to hide just a few custom fields from the email? Is that possible?

Attached the fields I would like to hide.

Solution: OK so the email template to edit is : Market: Order status notification and modified it to include :

if(!empty($itemFields)) {
			foreach($itemFields as $field) {
				$namekey = $field->field_namekey;
				if(!isset($item->$namekey) || !strlen($item->$namekey) || $field->field_namekey=="doesyouartworkhavebleedcropmarks" || $field->field_namekey=="isyourartworkapdfactualsize" || $field->field_namekey=="supplier" || $field->field_namekey=="shippingcost" || $field->field_namekey=="amount"){
					continue;
				}
				$t .= '<p>' . $fieldsClass->getFieldName($field) . ': ' . $fieldsClass->show($field, $item->$namekey, 'user_email') . '</p>';
			}
		}

Of course change to your own field names.

Attachments:
Last edit: 8 years 3 months ago by tariaki. Reason: [SOLVED]

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 months ago #246420

Hi,

In the emails ; you have one part for just the "design" where you can place "tags".
TXT are for text translations.
VAR are for variables.
LINEVAR are for internal variables inside a loop.
The tags are filled by PHP and the code can be found in the "preload" part of the email.

After that, HikaShop have new settings in order to display/hide custom fields in the emails ; some part are compatible with HikaMarket but I didn't process all tests. So some modifications in the email preload should be required.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 57
  • Thank you received: 1
8 years 3 months ago #246464

Hey Jerome,

Thanks for your reply.

I understand where the tags go and their functionality. In the pre-loaded PHP I can't understand how I can hide only some custom fields.

Regarding the display/hide in the custom fields I have set all the vendor options to 'No' (see attached) but that didn't hide the field in the email.

Am I missing something?

Attachments:

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

  • Posts: 57
  • Thank you received: 1
8 years 3 months ago #246488

OK just found out that all the custom fields are stored under {LINEVAR:PRODUCT_NAME}

How can I hide only the few fields that I want? Been through the pre-load code and couldn't find the way to do it...

Ideas?

Thanks ;)

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 months ago #246520

Hi,

Here the code in the email :

if(!empty($itemFields)) {
	foreach($itemFields as $field) {
		$namekey = $field->field_namekey;
		if(!isset($item->$namekey) || !strlen($item->$namekey))
			continue;
		$t .= '<p>' . $fieldsClass->getFieldName($field) . ': ' . $fieldsClass->show($field, $item->$namekey, 'user_email') . '</p>';
	}
}

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: tariaki

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

Moderators: Obsidev
Time to create page: 0.080 seconds
Powered by Kunena Forum