Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
Author « Topic »  

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/27/2020 :  13:25:09  
Good evening all,

I would like to add a commodity code to each product through the admin page. Is there an easy way of doing this such as adding a custom field?

Many thanks in advance.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Vince
Administrator

42761 Posts

Posted - 12/27/2020 :  23:41:09  
Hi Tim
I'm not really sure what you mean by a commodity code, but you can add custom fields to the product layout, sure. If you just add these parameters to the product page layout or detail page layout...
custom1
custom2
custom3
...then the product admin page will automatically allow for their entry.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/28/2020 :  14:00:58  
Thank you Vince, a commodity code is a number allocated to certain product types for exporting, importing and completing customs forms. To make life easier for myself I can allocate these to my site saving time and effort in the long run. I would also like to include this when printing invoices if it is at all possible?

Regards and thank you again.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Marshall
Ecommerce Template Guru

USA
1909 Posts

Posted - 12/28/2020 :  17:52:23  
Can you use the SKU field in the product admin?

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  02:42:25  
Thank you for your response.

I was thinking that but can I change the name from SKU to Commodity Code? If so how would I do this.

Many thanks
Tim

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Vince
Administrator

42761 Posts

Posted - 12/29/2020 :  02:53:45  
Hi Tim
There sure is, you would want...
$showproductsku="Commodity Code";

https://www.ecommercetemplates.com/phphelp/ecommplus/parameters.asp#sku

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  03:12:09  
Thank you Vince, that worked.

Just one final thing, can I now get it to print on the invoice?



Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

John M
Advanced Member

459 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  05:00:43  
Tim,

Commodity codes are Harmonised Customs Codes and are shared globally by countries for every exporter to use.

They have special meaning and absolutely cannot be used to replace the SKU/GTIN or the reference number otherwise you will be selling Commodity codes instead of motor parts!

You must use a custom field then print this onto the invoice along with the reference number, SKU/GTIN, description, quantity, price and total. You also need your EORI number somewhere on the invoice. This is the only way customs works smoothly.

If you implement what Vince and Marshall has said on the front end of your website it will be like driving it off a cliff. You could however do it only on the backend (secondary vsadmin folder) so that it only shows up on the invoices.

John

Edited by - John M on 12/29/2020 10:21:53

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  05:10:46  
Thankyou John

I have the EORI number and this is shown on my invoice but don't use SKU numbers, only Part Numbers.

As you can see from the link below it shows the commodity code (which replaces the SKU). I just need to get it to print on the invoice.

[url]https://www.tjmotorsport.co.uk/proddetail.php?prod=FCP167H[/url]

Many thanks again

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Edited by - TJM on 12/29/2020 05:11:41

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  08:38:03  
Afternoon,

Anybody able to advise how I can get the SKU to print after the part number on my invoices?

Many thanks again.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 12/29/2020 :  09:02:12  
Hi Tim, google uses the schema of a item as part of the structured data currently the Ferodo DS2500 Front Brake Pad does show what you want but the schema property is showing as <span itemprop="sku">1234</span> just thought I'd mention that. You might want to try one with the custom field method and use the sku for sku/mpn/isbn

Winners never quit, quitters never win
CSS and Responsive Designs
User Manual for Ecommerce Templates

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  13:20:20  
Evening,

Have followed advise and changed to custom label by including the following in the includes.pgp folder:

$detailcustomlabel1="Commodity Code:";
$admincustomlabel1="Commodity Code:";

I have then added customlabel1 to:

$detailpagelayout='navigation,productimage,productname,discounts,price,listprice,currency,' . (@$_SESSION['clientLoginLevel']==5 ? 'instock,' : '') . ',reviewstarslarge,shortdescription,options,quantity,addtocart,productid,customlabel1,manufacturer,dateadded,description,previousnext,searchwords,socialmedia,reviews';

This gets me the following layout on the detail page:

[url]https://www.tjmotorsport.co.uk/proddetail.php?prod=FCP167H[/url]

Apologies for all the questions, trying to learn but struggling to get there.

Many thanks in advance.




Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Edited by - TJM on 12/29/2020 13:20:52

dbdave
ECT Moderator

USA
10409 Posts

Posted - 12/29/2020 :  13:49:12  
quote:
$detailpagelayout='navigation,productimage,productname,discounts,price,listprice,currency,' . (@$_SESSION['clientLoginLevel']==5 ? 'instock,' : '') . ',reviewstarslarge,shortdescription,options,quantity,addtocart,productid,customlabel1,manufacturer,dateadded,description,previousnext,searchwords,socialmedia,reviews';


I believe that should be custom1 and not customlabel1 there

https://www.ecommercetemplates.com/help/css-layouts.asp#proddetailorder

Thanks,
David

Edited by - dbdave on 12/29/2020 13:52:23

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  14:10:34  
Thank you again,

I have changed to custom1 but it doesn't show in product detail page and it doesn't show in the admin product page, I assume this is where I would put the information in to show on the detail page?

Many thanks again.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

dbdave
ECT Moderator

USA
10409 Posts

Posted - 12/29/2020 :  14:20:04  
Is it possible you have the $detailpagelayout parameter defined in the proddetail.php page itself and if so, that will override what's in includes.

You do need to have that in your includes for it to show in the admin, but some designs are using that parameter in the detail page itself too.
Really it's probably best to just have it in the includes only.

If you have a secondary admin, then be sure to add it to the includes there.

You still need this in the includes if you want the custom labels to show,
$detailcustomlabel1="Commodity Code:";
$admincustomlabel1="Commodity Code:";

Thanks,
David

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/29/2020 :  15:23:35  
Hello David

Doesn't seem to be included in the proddetail.php page.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

dbdave
ECT Moderator

USA
10409 Posts

Posted - 12/29/2020 :  15:40:09  
Ok, can you post up what you have in the includes for (be sure to check for duplicates for these three as well).

$detailpagelayout
$detailcustomlabel1
$admincustomlabel1

Thanks,
David

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 12/30/2020 :  03:26:43  
Morning,

I have the following:

$detailpagelayout='navigation,productimage,productname,discounts,price,listprice,currency,' . (@$_SESSION['clientLoginLevel']==5 ? 'instock,' : '') . ',reviewstarslarge,shortdescription,options,quantity,addtocart,productid,custom1,manufacturer,dateadded,description,previousnext,searchwords,socialmedia,reviews';

and

$detailcustomlabel1="Commodity Code ";
$admincustomlabel1="Commodity Code ";

No duplicates in includes.php or proddetail.php.

Thank you again.


Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk

Edited by - TJM on 12/30/2020 03:28:52

John M
Advanced Member

459 Posts

Pre-sales questions only
(More Details...)

Posted - 12/30/2020 :  04:27:38  
Tim,

Do you use a separate vsadmin folder for your admin login?

Here is the code to add to the invoice:

Save this function below to a new include file e.g. vsadmin/inc/inccommoditycode.php

[code] function commoditycode(){
global $pCustom1,$rsOrders;
$sSQL="SELECT pCustom1 FROM products WHERE pID='" . $rsOrders['cartProdId'] ."'";
$result2=ect_query($sSQL) or ect_error();
if($rs2=ect_fetch_assoc($result2))
$pCustom1=($rs2['pCustom1']);
print " / " . $pCustom1 . '</span>';
}[/code]

In the incorders file at the top just below the //Author add the file you created above.

[code]include "inc/inccommoditycode.php";[/code]

then search for the line:
if($doedit || $isprinter) print editspecial($rsOrders['cartProdId'],'prodid' . $rowcounter,18,'AUTOCOMPLETE="off" onkeydown="return combokey(this,event)" onkeyup="combochange(this,event)"'); else print ($rsOrders['cartProdId']!=$giftwrappingid?'<a href="' . $thelink . '" target="_blank">':'') . htmlspecials($rsOrders['cartProdId']) . ($rsOrders['cartProdId']!=$giftwrappingid?'</a>':'');
just below this line add

[code]commoditycode();[/code]

This will add your commodity code to invoice/packing slip and also show on the screen.

Cheers,

John


Edited by - John M on 12/30/2020 04:37:33

TJM
Advanced Member

United Kingdom
398 Posts

Pre-sales questions only
(More Details...)

Posted - 01/14/2021 :  07:03:17  
Apologies for not replying sooner John, been isolating. Many thanks for your response again.

Tim Jones
TJ Motorsport
https://www.tjmotorsport.co.uk
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000