X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   SKU: SKUxxxxx Showing up after a modification. (https://forum.x-cart.com/showthread.php?t=13642)

SkullHead 04-26-2005 01:39 PM

SKU: SKUxxxxx Showing up after a modification.
 
If I modify a product and click save the SKU shows up as SKU: SKUxxxxx when it should just be SKU:xxxxx. It inserts the letters SKU into the SKU # box. Why doe's it do that and what is the fix?

sportruck 04-26-2005 02:54 PM

It could be happening in your template (include/product_modify.tpl) or in the php. What modifications did you make?

SkullHead 04-26-2005 03:14 PM

The only mods I did were the continue shopping and something and the search by sku mod. I uploaded the tpl you metioned but it didn't help. Also found out the it happens when I add a new product. 8O
Anyone know what tpl I need to edit or replace?

sportruck 04-26-2005 03:43 PM

I found this code in include/product_modify.php

Code:

if (empty($product_info)) {
        $sku_prefix = 'SKU';
        $product_info['productcode'] = array_pop(array_pop(func_query("SELECT MAX(productid) FROM $sql_tbl[products]")));
        $plus = 0;
        while(func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[products] WHERE productcode='$sku_prefix".($product_info['productcode'].(++$plus))."'")) {
        }
        $product_info['productcode'] = $sku_prefix.($product_info['productcode']+$plus);


I'm not sure why that is in there... but it could be where your prefix is coming from.

Update: It looks like when you add a new product it defaults the SKU to be the productid prepended by SKU. You should be able to change it as you fill out the item info.


All times are GMT -8. The time now is 11:19 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.