Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

SKU: SKUxxxxx Showing up after a modification.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-26-2005, 01:39 PM
 
SkullHead SkullHead is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 30
 

Default 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 SKUxxxx. It inserts the letters SKU into the SKU # box. Why doe's it do that and what is the fix?
__________________
4.0.17
PHP 4.4.7
Apache
MySQL server 5.0.51a-log
MySQL client 4.1.11
Web server Apache
Operation system Linux
Perl 5.008008
Reply With Quote
  #2  
Old 04-26-2005, 02:54 PM
 
sportruck sportruck is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 70
 

Default

It could be happening in your template (include/product_modify.tpl) or in the php. What modifications did you make?
Reply With Quote
  #3  
Old 04-26-2005, 03:14 PM
 
SkullHead SkullHead is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 30
 

Default

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.
Anyone know what tpl I need to edit or replace?
__________________
4.0.17
PHP 4.4.7
Apache
MySQL server 5.0.51a-log
MySQL client 4.1.11
Web server Apache
Operation system Linux
Perl 5.008008
Reply With Quote
  #4  
Old 04-26-2005, 03:43 PM
 
sportruck sportruck is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 70
 

Default

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.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:17 PM.

   

 
X-Cart forums © 2001-2020