Insert Supplier Details & Buy as a Gift option

  • Posts: 136
  • Thank you received: 1
13 years 10 months ago #4710

Hi,

Firstly, thank you for a wonderful extension! I'm in the process of building a website that is selling products that will be delivered virtually via email. I'm currently using the starter version, and will be upgrading or donating for sure! I just have a couple of questions around the product page...

1) I'm wondering if it's possible to add supplier details (name, address, phone, email and website) and have this displayed on the product page on the right hand side next to the price? I'm assuming this would be possible using either the Essential or Business versions of Hikashop?

2) I'd also like the ability to have two buttons, the first "buy" the second "buy as gift" - with the ability to enter in the recipient of the gifts name and email address. I would like this to then trigger another email with the order details to the gift recipient. However, slightly different layout to the standard email - omitting the price etc.

I'd also like to know if it's possible to limit only 1 product to the shopping cart at a time?

Here is an example of the product layout (obviously still in development!) dev.beautyscoop.com.au/index.php?option=...7&category_pathway=0

Thank you in advance!

Jacqueline

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 10 months ago #4714

Hi,

1) Using the essential version of HikaShop you can create custom product fields (via the menu Display->Custom fields) which will allow you to set supplier information which will appear on the product page automatically.

2) What you could do is first create two custom order fields (via the menu Display->Custom fields) which will appear during the checkout to ask for the gift recipient. And the user would be able to provide the information operationally. Then, you could change the order creation email so that if those fields are filled, it would send the order creation email to the email provided in the custom order field and not display the prices in that case. You can edit the emails via the menu System->Emails in the Business version of HikaShop.
In the email, the recipient can be changed with the code: $data->customer->user_email = $data->custom_field;
where custom_field is the namekey of your custom order field.
For the name : $data->customer->name = $data->custom_field;

3) You can limit the number of products in the cart with the option "Maximum number of items in the cart" in the tab display of the configuration in the commercial versions of HikaShop.

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

  • Posts: 136
  • Thank you received: 1
13 years 10 months ago #4764

Thanks Nicolas!

Quick question, when I upgrade to either Essential or Business version of Hikashop will the existing configuration changes applied still exist, or be overwritten?

Thanks again,
Jacqueline

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 10 months ago #4766

The configuration as well as all your data won't be overwritten. So you can safely update/upgrade HikaShop.

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

  • Posts: 136
  • Thank you received: 1
13 years 9 months ago #6988

Hi Nicolas,

I have now upgraded to Hikashop Business and am continuing to implement the functionality I would like.

I have a couple of questions regarding custom fields.

1) I have created additional fields that are displayed on the product form, as text fields - one being the website of the supplier. However, when displayed on the website, this does not appear as a hyperlink. How could I enable this?

2) As in the trail of this forum post, I'm creating custom fields for the order module when someone purchases an item as a gift. I would like to know how to set the format for tracking email addresses. i.e. what do I need to enter in the "format" field when creating my field.

I hope this makes sense!

Cheers,
Jacqueline

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #6996

Hi,

1. Indeed, there is no such capability. You can set the html tag yourself in the field:
<a href="http://myurl">http://myurl</a>

2. The format option of custom fields is only available for the date field so that you can specify the format you want for dates.
There is no option in the custom field to check for the email format.
If you know PHP and javascript, you can edit the file custom_fields of the view checkout via the menu Display->Views.

There you will have the line:
echo $this->fieldsClass->display($oneExtraField,$this->$type->$fieldName,'data');
that you can replace by:
echo $this->fieldsClass->display($oneExtraField,$this->$type->$fieldName,'data',false,'onchange="myCustomJSFunction(this);"');

Then, you can add a javascript function in order to check the field. Here is an example of what it could look like (not tested):
function myCustomJSFunction(obj){
if(obj.id=='custom_field_colum_name'){
obj.value=obj.value.replace(/ /g,"");
var filter = /^([a-z0-9_'&\.\-\+])+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,10})+$/i;
if(!filter.test(obj.value)){
obj.value='';
alert('Email not valid');
}
}
}
}

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

  • Posts: 136
  • Thank you received: 1
13 years 9 months ago #7135

Hi, I have set the html tag - however, when I try to launch the link from the site it appends to my current URL.

So for example - instead of just launching "My url" I get this dev.beautyscoop.com.au/mywebpage.html

When the mywebpage.html is the only part I want to launch.

Thanks again,

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 9 months ago #7137

You need to add http:// at the beginning of URLs. Otherwise, your browser will add automatically the URL of your website at the beginning thinking that your requesting a page on your website with a relative path.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum