Jump to content

[solved]274 abandoned carts - what is this some script they are running


durangodave

Recommended Posts

I logged into day to find 276 abandoned carts for diff products and dif quantity of products.  What is this some script someone is running and how (other than ip ban) do we protect ourselves from this junk.

 

Im guessing maybe i need to change it so they have to register before they order, is that possible.

 

Thanks

Edited by durangodave (see edit history)
Link to comment
Share on other sites

First of all activate front-office security on tab preferences ->general

Than take a look into your logs (server logs) and search out the possibly IP, maybe it is a bot. Search the whois of this IP on the net with a tool (there ar tons of them on GG). Block this IP.

Furthermore you should install a filter function like honeypotproject to ban all blacklisted and bad behaviour bots/IP's from your site.

 

At least, block all the countries, to where you are not selling with the geotargeting tool on you back-office. Known spamer, hacker and bad behaviour IP's are coming from Colombia, South Africa, China, Ukraine and others. Block this countries if you are not selling there your products.

Link to comment
Share on other sites

Hi, thanks...  yes front office security is on and i have been blocking ranges of ip's not only from cpanel but since i am my own host then i am also been doing so via the firewall as well.    The problem is that with some countries you cant just block all ips from that country because there are so many ips it would be totally take over the server, like i think russia has 5 million ips lol  and china has 150 million i think.  Its just too  much to block some of them, but my firewall does block some smaller countries ip's. 

 

I was hoping there was a way to force them to register before they could use the cart but i guess thats not possible without a mod or plugin.  

 

I really dont see what they gain by making 276 carts that are no good, unless they are just looking for some weakness somewhere.

 

Appreciate the help.. ;)

Link to comment
Share on other sites

here is my adaptation of that mod for 1.6 i will post this one step at a time so i dont forget anything

 

-------------------------------------

product-list.tpl

-------------------------------------

 

 

 

<!-- added mod for if logged -->

{if $logged}

<!-- end mod -->

 

{if isset($static_token)}

<a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">

<span>{l s='Add to cart'}</span></a>

{else}

<a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart',false, NULL, 'add=1&id_product={$product.id_product|intval}', false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}">

<span>{l s='Add to cart'}</span></a>

{/if}

 

<!-- added mod for if logged -->

{else}

Login for Prices & Ordering Options

{/if}

<!-- end of mod for if logged -->

 

 

 

 

---------------------------------------------------------

products.tpl

--------------------------------------------------------

 

 

<!-- added mod for if logged -->

{if $logged}

<!-- end mod -->

 

 

 

<!-- add to cart form-->

<form id="buy_block"{if $PS_CATALOG_MODE && !isset($groups) && $product->quantity > 0} class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html':'UTF-8'}" method="post">

<!-- hidden datas -->

<p class="hidden">

<input type="hidden" name="token" value="{$static_token}" />

<input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />

<input type="hidden" name="add" value="1" />

<input type="hidden" name="id_product_attribute" id="idCombination" value="" />

</p>

<div class="box-info-product">

<div class="content_prices clearfix">

{if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}

<!-- prices -->

<div class="price">

<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">

{if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if}

{if $priceDisplay >= 0 && $priceDisplay <= 2}

<span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>

<!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}

{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}

{/if}-->

<meta itemprop="priceCurrency" content="{$currency->iso_code}" />

{hook h="displayProductPriceBlock" product=$product type="price"}

{/if}

</p>

<p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">

{if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}

</span>

</p>

<p id="reduction_amount" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}>

<span id="reduction_amount_display">

{if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|floatval !=0}-{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval}

{/if}

</span>

</p>

<p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} class="hidden"{/if}>

{if $priceDisplay >= 0 && $priceDisplay <= 2}

{hook h="displayProductPriceBlock" product=$product type="old_price"}

<span id="old_price_display">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}</span>

<!-- {if $tax_enabled && $display_tax_label == 1}{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{/if} -->

{/if}

</p>

{if $priceDisplay == 2}

<br />

<span id="pretaxe_price">

<span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span>

{l s='tax excl.'}

</span>

{/if}

</div> <!-- end prices -->

{if $packItems|@count && $productPrice < $product->getNoPackPrice()}

<p class="pack_price">{l s='Instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>

{/if}

{if $product->ecotax != 0}

<p class="price-ecotax">{l s='Including'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for ecotax'}

{if $product->specificPrice && $product->specificPrice.reduction}

<br />{l s='(not impacted by the discount)'}

{/if}

</p>

{/if}

{if !empty($product->unity) && $product->unit_price_ratio > 0.000000}

{math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

<p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'html':'UTF-8'}</p>

{hook h="displayProductPriceBlock" product=$product type="unit_price"}

{/if}

{/if} {*close if for show price*}

{hook h="displayProductPriceBlock" product=$product type="weight"}

<div class="clear"></div>

</div> <!-- end content_prices -->

<div class="product_attributes clearfix">

<!-- quantity wanted -->

{if !$PS_CATALOG_MODE}

<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>

<label>{l s='Quantity'}</label>

<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />

<a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down">

<span><i class="icon-minus"></i></span>

</a>

<a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up">

<span><i class="icon-plus"></i></span>

</a>

<span class="clearfix"></span>

</p>

{/if}

<!-- minimal quantity wanted -->

<p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>

{l s='This product is not sold individually. You must select at least'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> {l s='quantity for this product.'}

</p>

{if isset($groups)}

<!-- attributes -->

<div id="attributes">

<div class="clearfix"></div>

{foreach from=$groups key=id_attribute_group item=group}

{if $group.attributes|@count}

<fieldset class="attribute_fieldset">

<label class="attribute_label" {if $group.group_type != 'color' && $group.group_type != 'radio'}for="group_{$id_attribute_group|intval}"{/if}>{$group.name|escape:'html':'UTF-8'} </label>

{assign var="groupName" value="group_$id_attribute_group"}

<div class="attribute_list">

{if ($group.group_type == 'select')}

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>

{/foreach}

</select>

{elseif ($group.group_type == 'color')}

<ul id="color_to_pick_list" class="clearfix">

{assign var="default_colorpicker" value=""}

{foreach from=$group.attributes key=id_attribute item=group_attribute}

{assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}

<li{if $group.default == $id_attribute} class="selected"{/if}>

<a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">

{if $img_color_exists}

<img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />

{/if}

</a>

</li>

{if ($group.default == $id_attribute)}

{$default_colorpicker = $id_attribute}

{/if}

{/foreach}

</ul>

<input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" />

{elseif ($group.group_type == 'radio')}

<ul>

{foreach from=$group.attributes key=id_attribute item=group_attribute}

<li>

<input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />

<span>{$group_attribute|escape:'html':'UTF-8'}</span>

</li>

{/foreach}

</ul>

{/if}

</div> <!-- end attribute_list -->

</fieldset>

{/if}

{/foreach}

</div> <!-- end attributes -->

{/if}

</div> <!-- end product_attributes -->

<div class="box-cart-bottom">

<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>

<p id="add_to_cart" class="buttons_bottom_block no-print">

<button type="submit" name="Submit" class="exclusive">

<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>

</button>

</p>

</div>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}<strong></strong>

</div> <!-- end box-cart-bottom -->

</div> <!-- end box-info-product -->

</form>

 

 

<!-- added mod for if logged -->

 

{else}

Login for Prices & Ordering Options

{/if}

 

<!-- end mod -->

 

 

-------------------------------------------------------------------------------

themes/yourtheme/modules/blockspecials/blockspecials.tpl

--------------------------------------------------------------------------------

 

<!-- added mod for if logged -->

{if $logged}

<!-- end mod -->

<span class="price special-price">

{if !$priceDisplay}

{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}

{/if}

</span>

{if $special.specific_prices}

{assign var='specific_prices' value=$special.specific_prices}

{if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))}

<span class="price-percent-reduction">-{$specific_prices.reduction*100|floatval}%</span>

{/if}

{/if}

<span class="old-price">

{if !$priceDisplay}

{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}

{/if}

</span>

 

<!-- added mod for if logged -->

{else}

Login for Prices & Ordering Options

{/if}

<!-- end mod -->

 

 

-------------------------------------------------------------------------------

themes/yourtheme/modules/homefeatured/homefeatured.tpl

--------------------------------------------------------------------------------

 

original mod edit had changes to this file but no mods to this file it looks like they just

include the products-list.tpl now so we are covered on this one.

 

that should do it i think, if you find something please post to help everyone thanks

Edited by durangodave (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...