Jump to content

 

tbirnseth

Member Since 08 Nov 2008
Offline Last Active May 02 2022 02:11 AM
*****

#334353 Re-Order Tabs In Admin: Products: Edit-View

Posted by tbirnseth on 12 December 2020 - 09:51 PM

I believe on the admin side you would need a small chunk of custom code to reorder the navigation tabs data that is generated.  I would use a 'post' controller like app/addons/my_changes/controllers/backend/products.post.php containing something similar to (not tested, just an idea):

if( !defined('BOOTSTRAP') ) die('Access denied');
 
use Tygh\Registry;
 
if( $_SERVER['REQUEST_METHOD'] == 'GET' && ($nav_tabs = Registry::get('navigation.tabs')) ) {
  $my_tab_order = array('general', 'options', 'shippings', 'qty_discounts', 'product_tabs', 'seo'); // all the rest will be copied over in their original order
  $new_tabs = array();
  foreach($my_tab_order as $tab_id) {
    if( isset($nav_tabs[$tab_id]) ) {
      $new_tabs = $nav_tabs[$tab_id];
      unset($nav_tabs[$tab_id]);
    }
    // Unspecified tabs are left in $nav_tabs;
  }
  if( !empty($nav_tabs) )
    $new_tabs = array_merge($new_tabs, $nav_tabs);
  Registry::set('navigation.tabs', $new_tabs);
}
return array(CONTROLLER_STATUS_OK);

 

This should result with a tab order of general, options, shippings, qty_discounts, product_tabs, seo, files, subscribers, addons, features,buy_together, attachments and blocks.  Followed by any addons that may add to your product tabs.




#334141 How Make Product As Carton ?

Posted by tbirnseth on 06 December 2020 - 08:03 PM

Generally, these are separate products.  However, you might be able to use variations to get what you want.

Feature: Product Quantity

Variants: single, carton




#334119 Vendor Debts: "pay The Fees" Or "refill Balance" Do Not Work

Posted by tbirnseth on 05 December 2020 - 09:42 PM

Think you should ask the helpdesk about this given there's no other administrators response.




#333907 How To Clear Cart Except The Very Last Added Item?

Posted by tbirnseth on 29 November 2020 - 08:50 PM

function fn_alter_cart_products(&$cart, $leave_items=0) {
  $item_count = count($cart['products']);
  if( $item_count > $leave_items ) {
    $_products = array_reverse($cart['products'], true);
    foreach($_products as $cartid => $item) {
      if( $leave_items > 0 ) {
        $leave_items--;
        continue; // leave this item
      }
      unset($_products[$cart_id]);
    }
    $cart['products'] = array_reverse($_products,true);
  } 
}



#333601 Landing Page / Redirect After Successful Login

Posted by tbirnseth on 17 November 2020 - 08:07 PM

Not sure your browser code will happen in a POST.

You can use 'die("Got here"); instead.




#333501 Hiding Vendor Menu Items

Posted by tbirnseth on 14 November 2020 - 07:37 PM

We've developed an easy to use addon tha allows you to hide selected menus, tabs and fields from Vendors.  
 
It can also optionally modify email fields for:
  + From customer to Vendor - hide customer email/phone fields, change from/reply-to email headers to be from site
  + From Vendor to Customer - change From/Reply-to to Site email address (TBD - change Vendor's email/phone to site's email/phone).
 
Purchase site: https://ez-ms.com/ez...dor-fields.html
Documentation: https;//ez-ms.com/docs/ez_vendor_fields.pdf
Marketplace: https://marketplace....dor-fields.html


#333499 Landing Page / Redirect After Successful Login

Posted by tbirnseth on 14 November 2020 - 07:01 PM

Use an auth post controller.  I.e. app/addons/my_changes/controllers/common/auth.post.php with content similar to:

if( AREA == 'C' && !empty($_REQUEST['return_url']) && $mode == 'login' )
  $_REQUEST['return_url'] = fn_url("my_controller.my_mode&my_param=foo");

 

UNTESTED




#333279 Redirect After Customer Registration

Posted by tbirnseth on 07 November 2020 - 06:34 PM

You'd either have to use a hook or ask the Unitheme developers to make it a configurable parameter.




#332946 Where To Add Facebook Messenger Code Snippet

Posted by tbirnseth on 28 October 2020 - 04:57 PM

Thx for the correction Ecom.  Was working from memory (not always the best) and use the data-no-defer very infrequently (like maybe once in the 5 years it's been around!).




#332775 Discussion About Cs-Cart Marketplace

Posted by tbirnseth on 23 October 2020 - 06:24 PM

There's no conflict between "Marketplace" and "Multi-Vendor".  I think you're trying to solve a problem that doesn't exist.




#332697 Choose Vendorplan When Creating A Vendor Through Api

Posted by tbirnseth on 21 October 2020 - 06:00 PM


Can I then state that the API documentation is incomplete in some cases?

Thanks for the morning chuckle!

Can I then state that the API documentation is incomplete in some cases?




#332696 Global Options In Mve

Posted by tbirnseth on 21 October 2020 - 05:16 PM

Don't want separate product_id's for simple options.  This isn't Tee Shirts. It's not an inventoried item.  

 

Variations also don't solve the problem of being able to provide a template that the data is editable by the vendor but the template is managed by the site admin.  And (as I understand it) variations use Features, not Options.

 

Guess I'll have to write an addon to get the prior 'option template' type functionality back. 

 

This removing valid features because you want to force people to conduct business in some one-size fits all approach is really poor software/business plan.




#332164 Make Mobile Number Uniquer Per Account For Customers

Posted by tbirnseth on 05 October 2020 - 05:56 PM

it was giving error 

 

why didn't you address the error?  You really can't expect us to help you when you don't provide full and complete information.  If you are not a developer and can't address an error in untested code, then I'd strongly suggest you hire someone who can.




#332101 How To Turn Off Display Base Href

Posted by tbirnseth on 03 October 2020 - 06:49 PM

Add the following code to this file (or create it if it's not in use): app/addons/my_changes/controllers/frontend/index.post.php

Tygh::$app['view']->assign('display_base_href', false);

 

UNTESTED




#331802 Use Custom Add-On Instead Of My_Changes Add-On

Posted by tbirnseth on 23 September 2020 - 06:15 PM

Does that mean the entry will then be rewritten (based on the entries in add_on.xml)? 

So far, I haven't dared to delete the entry, just edited it (in the cscart_addons table).

Can I actually delete it?

 

 

If you remove or rename it, the addon is effectively uninstalled.  I made this suggestion ONLY because I though you deleted the files BEFORE uninstalling the addon.  Hence there's no way to find the data to uninstall.