Jump to content

 

Vivek Gupta

Member Since 09 Jul 2015
Offline Last Active Dec 04 2018 06:57 AM
*****

#295480 Vendor Profile Registration Field

Posted by Vivek Gupta on 14 February 2018 - 03:09 AM

i was wondering and try to figure out, how and where to.

 

i want to add bank detail in vendor registration.

 

So i create new profile field  under Administration > profile tab......but after adding new field for banking. it didnt show under vendor registration but only shown under normal user registration.

 

am i miss something?

 

Profile fields available for only customer registration.

 

For Vendor registration page you need to alter some code or you can buy this addon : https://store.webkul...gistration.html




#263676 Disable Cash On Delivery For Orders Amount Exceending

Posted by Vivek Gupta on 11 November 2016 - 12:09 PM

 

 

 

Vivek Gupta, on 10 Nov 2016 - 10:49 PM, said:snapback.png

 

use  below code in checkout_select_default_payment_method  hook to fix this  or this in checkout.php controller after line " fn_set_hook('checkout_select_default_payment_method', $cart, $payment_methods, $completed_steps);"

 

$available_payment_ids = array();
foreach ($payment_methods as $group) {
foreach ($group as $method) {
$available_payment_ids[] = $method['payment_id'];
}
}

// Change default payment if it doesn't exists
if (!in_array($cart['payment_id'], $available_payment_ids)) {
$cart['payment_id'] = reset($available_payment_ids);
$cart['payment_method_data'] = fn_get_payment_method_data($cart['payment_id']);
}


 

 

 

i have created hook (init.php and func.php) with code attached above and insert my code into checkout.php. The result is still the same (COD in always show).

use  php hook in /app/addons/my_changes/init.php


fn_register_hooks(
	'prepare_checkout_payment_methods',
	'checkout_select_default_payment_method'
);

Write code in   /app/addons/my_changes/func.php

function fn_my_changes_prepare_checkout_payment_methods(&$cart, &$auth, &$payment_groups)
{
    foreach ($payment_groups as $g_key => $group) {
        foreach ($group as $p_key => $payment) {
            if ($payment['template'] == 'views/orders/components/payments/cod.tpl' && $cart['total'] > 100) {
                unset($payment_groups[$g_key][$p_key]);
            }
        }
        if (empty($payment_groups[$g_key])) {
            unset($payment_groups[$g_key]);
        }
    }
}
function fn_my_changes_checkout_select_default_payment_method(&$cart, &$payment_methods, &$completed_steps)
{
        $available_payment_ids = array();
        foreach ($payment_methods as $group) {
            foreach ($group as $method) {
                $available_payment_ids[] = $method['payment_id'];
            }
        }
        
        // Change default payment if it doesn't exists
        if (!in_array($cart['payment_id'], $available_payment_ids)) {
            $cart['payment_id'] = reset($available_payment_ids);
            $cart['payment_method_data'] = fn_get_payment_method_data($cart['payment_id']);
        }
}

Put this .. surely it will work .   :)




#263594 Disable Cash On Delivery For Orders Amount Exceending

Posted by Vivek Gupta on 10 November 2016 - 05:19 PM

 

 

Any error or blank screen. Payment is still displayed in the list. 

 

use  below code in checkout_select_default_payment_method  hook to fix this  or this in checkout.php controller after line " fn_set_hook('checkout_select_default_payment_method', $cart, $payment_methods, $completed_steps);"

 

$available_payment_ids = array();
    foreach ($payment_methods as $group) {
        foreach ($group as $method) {
            $available_payment_ids[] = $method['payment_id'];
        }
    }
    
    // Change default payment if it doesn't exists
    if (!in_array($cart['payment_id'], $available_payment_ids)) {
        $cart['payment_id'] = reset($available_payment_ids);
        $cart['payment_method_data'] = fn_get_payment_method_data($cart['payment_id']);
    }







#261507 Can't Download Db Backup To My Pc.

Posted by Vivek Gupta on 16 October 2016 - 09:03 AM

Check here 

 

http://prntscr.com/cuwvn3




#260687 Does Anyone Have A Lucky Orange Add-On?

Posted by Vivek Gupta on 04 October 2016 - 06:01 PM

 

We're looking at Lucky Orange - http://luckyorange.com

 

Is there an add-on out there?

 

Hi ,

 

Login to http://luckyorange.com

add your site . you will get a script code (copy that).

 

.......................................................................................

 

open ftp .

create file  /design/themes/[theme_name]/templates/addons/my_changes/hooks/index/head_scripts.post.tpl

paste script code here & save.

 

 

clear site cache & check your site data at lucky orange dashboad .

don't forget to activate my_changes addon

:)




#258967 How Do I Set The Default Out Of Stock Actions For A New Product?

Posted by Vivek Gupta on 07 September 2016 - 05:48 AM

 

When adding a new product via (Admin > Products > Create) the default Out Of Stock Actions is set to None.

 

How do I make the default "Sign Up For Notification"?

 

I need this so there is one less thing to do (i.e. forget to do...) when adding new products.

 

 

Attached Thumbnails
  • post-9175-0-61913200-1473220059_thumb.pn
  •  

 

Hi ,

 

Go to   /design/backend/templates/views/products/update.tpl

 

replace

<option value="N" {if $product_data.out_of_stock_actions == "N"}selected="selected"{/if}>{__("none")}</option>
<option value="B" {if $product_data.out_of_stock_actions == "B"}selected="selected"{/if}>{__("buy_in_advance")}</option>
<option value="S" {if $product_data.out_of_stock_actions == "S"}selected="selected"{/if}>{__("sign_up_for_notification")}</option> 

With

<option value="S" {if $product_data.out_of_stock_actions == "S"}selected="selected"{/if}>{__("sign_up_for_notification")}</option>
<option value="B" {if $product_data.out_of_stock_actions == "B"}selected="selected"{/if}>{__("buy_in_advance")}</option>
<option value="N" {if $product_data.out_of_stock_actions == "N"}selected="selected"{/if}>{__("none")}</option>

 




#258863 Multistore - Shared Products Different Inventory Amounts?

Posted by Vivek Gupta on 06 September 2016 - 07:12 AM

 

I have a quick question I hope somebody can answer. 

 

Is it possible to have 2 stores, with shared products, but with different inventory amounts? 

 

Hi ,

 

its not possible without additional modification . for this functionality you need to go for customization .

 

alternative is that  you can clone same product for second store & manage inventory according to store.




#258185 Add New Carrier Shipment

Posted by Vivek Gupta on 29 August 2016 - 01:28 PM

 

Please take a look at the following module:

 

http://marketplace.c...s-tracking.html

 

 

 

 

if you have any query, please write at support@webkul.com




#257686 Nominate And Vote For Cs-Cart In Cmscritic!

Posted by Vivek Gupta on 23 August 2016 - 02:26 PM

done (y)




#256846 My Website Is Not Indexing On Google

Posted by Vivek Gupta on 10 August 2016 - 11:46 AM

  •  

    Hello

     

    please help to index my website (http://www.hammernutritioneurope.com) on google.

     

    I have done all the things to get index this website but there is no result.

     

    Regards

     
  • Create a Sitemap –  Use cs-cart Sitemap addon.
  • Submit Sitemap to Google Webmaster Tools –  simply create a free Google Account, then sign up for Webmaster Tools. Add your new site to Webmaster Tools, then go to Optimization > Sitemaps and add the link to your website’s sitemap to Webmaster Tools to notify Google about it and the pages you have already published. 
  • Install Google Analytics
  • Submit Website URL to Search Engines –  google , yahho ,bing
  • Create or Update Social Profiles –  Twitter profiles, Facebook pages, Google+ profiles or pages, LinkedIn profiles or company pages, Pinterest profiles, and YouTube channels.
  • Share Your New Website Link  

Submit you site url here : google




#256788 Mobile Commerce App

Posted by Vivek Gupta on 09 August 2016 - 11:48 PM

Hi , 

 

You can use this app for cs-cart multivendor .https://store.webkul...Mobile-App.html




#255468 Remove Altert Warning At Checkout

Posted by Vivek Gupta on 22 July 2016 - 05:33 AM

 

Hi guys, is there any way to remove the alert warning at step 3 of Checkout. The message is "Important Shipping rates were changed"

 

This message looks weird to customers, as if there were charged a higher postage!

 

go to app/functions/fn.cart.php  and app/app/controllers/frontend.checkout.php

 

Search fn_set_notification('W', __('important'), __('text_shipping_rates_changed'));

 

& comment this line in both file




#254755 Not Showing Rma Tab

Posted by Vivek Gupta on 12 July 2016 - 01:20 PM

Please check also you try to access this as a admin (not a vendor). 




#254302 Add A Guest Customer To Old Orders

Posted by Vivek Gupta on 06 July 2016 - 08:11 AM

open to /app/functionsfn.cart.php

 

goto fn_get_orders

 

Replace 
 
if (!empty($params['user_id'])) {
        $condition .= db_quote(' AND ?:orders.user_id IN (?n)', $params['user_id']);
 
with
 
if (!empty($params['user_id'])) {
        $condition .= db_quote(' AND ?:orders.user_id IN (?n)', $params['user_id']);
        $condition .= db_quote(' OR ?:orders.email = ?s', $_SESSION['cart']['user_data']['email']);



#250799 Increase Blog Preview On Page

Posted by Vivek Gupta on 17 May 2016 - 01:44 PM

check this: http://prnt.sc/b53yyg

 

 

at code level follow this (only for blog)

 

app/addons/blog/controllers/frontend/pages.post.php

 

Replace this 

 list($subpages, $search) = fn_get_pages(array(
            'parent_id' => $page_data['page_id'],
            'page' => !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0,
            'page_type' => PAGE_TYPE_BLOG,
            'get_image' => true,
            'status' => 'A',
            'sort_by' => 'timestamp',
            'sort_order' => 'desc'
        ), Registry::get('settings.Appearance.elements_per_page'));

 

with

 

list($subpages, $search) = fn_get_pages(array(

            'parent_id' => $page_data['page_id'],
            'page' => !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0,
            'page_type' => PAGE_TYPE_BLOG,
            'get_image' => true,
            'status' => 'A',
            'sort_by' => 'timestamp',
            'sort_order' => 'desc'
        ), 12);