X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Getting double Estimate Shipping Cost buttons in cart (https://forum.x-cart.com/showthread.php?t=72222)

jack68938 06-03-2015 08:04 AM

Getting double Estimate Shipping Cost buttons in cart
 
1 Attachment(s)
For some reason, I am getting double Estimate Shipping Cost buttons in cart.

See attached image.

jack68938 06-04-2015 08:37 AM

Re: Getting double Estimate Shipping Cost buttons in cart
 
1 Attachment(s)
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).

jack68938 06-04-2015 08:41 AM

Re: Getting double Estimate Shipping Cost buttons in cart
 
1 Attachment(s)
It is showing everything twice in this area (see attached).

qualiteam 06-04-2015 11:30 AM

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?

jack68938 06-04-2015 12:02 PM

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".

qualiteam 06-04-2015 12:21 PM

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 :-)

jack68938 06-04-2015 12:56 PM

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")

qualiteam 06-04-2015 01:33 PM

Re: Getting double Estimate Shipping Cost buttons in cart
 
Yes, this will cause the template to appear in "layout.main.center" twice

jack68938 06-05-2015 04:05 AM

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.

tony_sologubov 06-08-2015 12:49 PM

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


All times are GMT -8. The time now is 12:51 AM.

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