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

Need Help with Changing Width of Admin's Related Products PopUp.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-11-2013, 10:56 AM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Need Help with Changing Width of Admin's Related Products PopUp.

The width of the related products popup is too narrow and the truncated text makes it difficult to choose the correct item when the catalog and product names are similar. This popup is also the same one that is seen when using the AOM to add products to an order. The popup's code is /skin/common_files/main/popup_product.tpl.

For reference I have attached a screen print from the user manual that shows the popup that I am referring to.

I used webmaster mode and firebug to hunt down the CSS style that controls the width. I found that the existing width is a computed value that is 800px wide. But I can't find where/how it inherits this value.

The best I can come up with is that it involves the /skin/common_files/lib/jqueryui/jquery.ui.admin.css styles. But there's nothing there that controls the popup width. I've run out of ideas on where to find it.

In a perfect world I'd like the width to auto size to the show the entire text in the two populated columns. But if that is not possible I would like to change it to be a fixed 1000px wide and just accept the truncations that occur.

It would be awesome to know the trick to finding the file I need to edit. And any tips to make it auto size.
Attached Thumbnails
Click image for larger version

Name:	related_prod.gif
Views:	109
Size:	9.1 KB
ID:	3498  
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote
  #2  
Old 07-12-2013, 01:45 PM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Re: Need Help with Changing Width of Admin's Related Products PopUp.

I spent more time on this today and still have not figured out how to increase the width of the popup. The existing 800px width appears to be inherited, but I don't know enough about CSS to solve what I though was going to be an easy task. Long story short, I sure could use some advice on how to increase the size.
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote
  #3  
Old 07-12-2013, 02:17 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Need Help with Changing Width of Admin's Related Products PopUp.

The height/weight of the popup is set in js file

/public_html/skin/common_files/js/popup_product.js
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
Thomasb134 (07-12-2013)
  #4  
Old 07-12-2013, 06:16 PM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Re: Need Help with Changing Width of Admin's Related Products PopUp.

Steve, you are a lifesaver! Although changing the width value to 1000 in the popup_product.js file did not completely do the trick, you pointed me in the right direction.

It turns out that the width is also set in file popup_open.js by a function called popupOpen(). I changed the maxWidth value there to 1000. Now I don't have to struggle with finding the right catalog or product name due to the truncated text of the previously smaller popup window size.

I also added the product's SKU number to the product's name. We have a lot of products with very similar names so seeing the SKU's in the populated list is very helpful. These two simple changes are awesome; I am a very happy guy, thanks to you.
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote
  #5  
Old 03-25-2014, 09:11 PM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default Re: Need Help with Changing Width of Admin's Related Products PopUp.

Hey Thomas, what code did you add to popup_product.js to get the sku to show. I have the same issue with product names.
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote
  #6  
Old 03-25-2014, 09:57 PM
 
Thomasb134 Thomasb134 is offline
 

X-Adept
  
Join Date: Apr 2007
Location: USA
Posts: 789
 

Default Re: Need Help with Changing Width of Admin's Related Products PopUp.

Quote:
what code did you add to popup_product.js to get the sku to show.

In /skin/common_files/main/popup_product.tpl
Find:
Code:
<option value="{$products[prod_idx].productid}">{$products[prod_idx].product}</option>

And change to:
Code:
<option value="{$products[prod_idx].productid}">{$products[prod_idx].productcode}{": "}{$products[prod_idx].product}</option>
__________________
Thomas / USA
XCart V4.4.5 Gold
XCart Mobile V1.4.12
XCart X-PDF
XCart X-HotProducts
AlteredCart Checkout One (One Page Checkout)
BCSE Back In Stock
CFL Holiday Message
CFL System Message
Smack Digital (WebsiteCM) Remember Anon Carts
xcartmods Testimonials
xcartmods reCAPTCHA for X-Cart Classic
Unix, PHP 7.0 (patched 5.4).
MySQL 5.6
Reply With Quote

The following user thanks Thomasb134 for this useful post:
DrQuietus (03-25-2014)
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 11:14 AM.

   

 
X-Cart forums © 2001-2020