Jump to content

ypg's Content

There have been 10 items by ypg (Search limited from 04-Dec 19)


Sort by                Order  

#318729 Import "buy_Now_Url" From Csv

Posted by ypg on 13 August 2019 - 06:45 AM in General Questions

It should work. Try to delete the var/cache directory manually

Yes, it is working now. 

Thank you so much for your time and efforts.

 

YPG




#318721 Import "buy_Now_Url" From Csv

Posted by ypg on 13 August 2019 - 04:41 AM in General Questions

Did you clear cache?

yes cache was already cleared.




#318701 Import "buy_Now_Url" From Csv

Posted by ypg on 12 August 2019 - 08:43 AM in General Questions

design/themes/THEME/templates/addons/catalog_mode/hooks/buttons/add_to_cart.override.tpl

 

replace

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name=""}

with

{include file="buttons/button.tpl" but_id=$but_id but_text=__("buy_now") but_href=$product.buy_now_url but_role=$but_role|default:"text" but_meta="ty-btn__primary" but_name="" but_target="_blank"}

and clear cache then

Thanks for update but still when you click on Buy now button the external url loads in same page.

The link generated in buy now button does not contain (target"_blank").

It contains link as <a href="http://www.xxx.com" class="ty-btn ty-btn__primary " >Buy now</a>




#318671 Import "buy_Now_Url" From Csv

Posted by ypg on 10 August 2019 - 09:05 AM in General Questions

The default Buy Now button in cataloge mode opens the external urls in the same window.  Is it possible to open the link in new window.

 

 

 




#307510 Search Abuse

Posted by ypg on 12 October 2018 - 10:18 AM in Security

I have corrected my post. It should work now

Thanks, it is working now. But there should be some other way out to stop this.




#307478 Search Abuse

Posted by ypg on 11 October 2018 - 05:22 PM in Security

 

In this case use in the same file

<?php

if (!defined('BOOTSTRAP')) { die('Access denied'); }

if ($mode == 'search') {
    if (defined('CRAWLER')) {
        exit;
    }
    if (empty($auth['user_id'])) {
        return array(
            CONTROLLER_STATUS_REDIRECT,
            'auth.login_form?return_url=' . urlencode(Registry::get('config.current_url'))
        );
    }
}

return;

Applied the code but this loads  'Sorry, service is temporarily unavailable.' page for everyone once you perform search.




#307447 Search Abuse

Posted by ypg on 11 October 2018 - 09:54 AM in Security

Unfortunately after few days they are back again today. I wonder it it is possible to allow product search only for customer who are logged in.

 

YPG




#307261 Search Abuse

Posted by ypg on 05 October 2018 - 10:49 AM in Security

Yes, it can be done with simple modification. But search bar with reCaptcha will look ugly

 

The solution provided by you is  working perfect. I think this code  should be part of original cs-cart installation. There is no need for captcha as it would look very ugly. 




#307245 Search Abuse

Posted by ypg on 04 October 2018 - 11:34 AM in Security

try the following
 
- install and activate My change module
- create the app/addons/my_changes/controllers/frontend/products.pre.php file with the following content
 
 

<?php

if (!defined('BOOTSTRAP')) { die('Access denied'); }

if ($mode == 'search') {
    if (defined('CRAWLER')) {
        exit;
    }
}

return;

- monitor your logs

 

(!) Not tested

 

Thanks for valuable code. Just applied, the server load appears to be down for the moment.

Will continue to monitor. 

 

I wonder if we can apply goggle reCaptcha to search bar, as a result such crawlers would not be able to proceed.

 

 

YPG




#307215 Search Abuse

Posted by ypg on 03 October 2018 - 05:28 PM in Security

Hello everyone, 

For last few days our website was  experiencing very heavy load. We checked visitor log and found that a thousands of searches being performed in the format like this.

 

 

 

 

It appears that many bots/spiders and proxies are reaching search bar.

 

I have spoken to web hosting company who have suggested to add some kind of security such as captcha to the search bar.

I would highly appreciate if anyone can suggest how to achieve this or any other solution to stop bots/spider to abuse search function.

 

Thanks

YPG