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

Getting double Estimate Shipping Cost buttons in cart

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-03-2015, 08:04 AM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Getting double Estimate Shipping Cost buttons in cart

For some reason, I am getting double Estimate Shipping Cost buttons in cart.

See attached image.
Attached Thumbnails
Click image for larger version

Name:	doubleShipping.jpg
Views:	115
Size:	36.1 KB
ID:	4168  
__________________
xCart 5.2.16
Reply With Quote
  #2  
Old 06-04-2015, 08:37 AM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

The top button take you to a seperate page to enter the info and the bottom button opens the modal window to enter the info.

If i open the bottom button and enter nothing then close the window, the shipping button is normal (see attached).
Attached Thumbnails
Click image for larger version

Name:	doubleShipping2.jpg
Views:	112
Size:	35.3 KB
ID:	4169  
__________________
xCart 5.2.16
Reply With Quote
  #3  
Old 06-04-2015, 08:41 AM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

It is showing everything twice in this area (see attached).
Attached Thumbnails
Click image for larger version

Name:	doubleShipping3.jpg
Views:	117
Size:	67.0 KB
ID:	4170  
__________________
xCart 5.2.16
Reply With Quote
  #4  
Old 06-04-2015, 11:30 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

Do you have a custom skin? This might happen if you copied a template file (or a PHP class) having "@ListChild" tag into a custom skin and left the tag in the copy.

Also, try to run the "Re-deploy the store" function (after creating a full backup including files and the MySQL database). Does this help?
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #5  
Old 06-04-2015, 12:02 PM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

I am running a custom skin. There are "@ListChild" lines in some of the tpl files. How do we specify weight if that line is removed? Or what do you mean " in the copy".
__________________
xCart 5.2.16
Reply With Quote
  #6  
Old 06-04-2015, 12:21 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

It is a bit tricky - you should do this from your module's Main.php file:

PHP Code:
...
  public static function 
runBuildCacheHandler()
  {
    
parent::runBuildCacheHandler();

    
$filter = array(
      
'list' => YOUR_LIST_NAME,
      
'tpl' => YOUR_TEMPLATE_PATH,
      
// or use: 'child' => YOUR_WIDGET_CLASS_NAME,
    
);

    
$widgets = \XLite\Core\Database::getRepo('\XLite\Model\ViewList')->findBy($filter)

    foreach (
$widgets as $widget) {
      
$widget->setWeight(YOUR_WEIGHT);
    }



Then run the "Re-deploy the store" function to get this method look through lists of views and update necessary templates/classes.

I haven't tested the code, but this either should work as is, or the logic would be very similar
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #7  
Old 06-04-2015, 12:56 PM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

So if I leave the line below in the top of the tpl file that I copied to my custom skin, that could cause the Estimate Shipping Cost buttons to display twice?

@ListChild (list="layout.main.center", weight="100")
__________________
xCart 5.2.16
Reply With Quote
  #8  
Old 06-04-2015, 01:33 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

Yes, this will cause the template to appear in "layout.main.center" twice
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #9  
Old 06-05-2015, 04:05 AM
 
jack68938 jack68938 is offline
 

Advanced Member
  
Join Date: May 2015
Posts: 42
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

In the documentation, it is creating a new template and says to keep the @ListChild line.

Adding new templates and widgets

http://kb.x-cart.com/display/XDD/Step+2+-+applying+design+changes#Step2-applyingdesignchanges-Addingnewtemplatesandwidgets

Actually, I don't have any tpl's in my skin that displays that right bar in the checkout page. It looks like the GiftCertificate module tries to display but after a few seconds the second shipping button displays.
__________________
xCart 5.2.16
Reply With Quote
  #10  
Old 06-08-2015, 12:49 PM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Getting double Estimate Shipping Cost buttons in cart

@jack68938,

As I see you tried to apply some change to estimate shipping dialog. Could you please let me know what change you tried to apply and how?

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 07:39 AM.

   

 
X-Cart forums © 2001-2020