Jump to content



Member Since 08 Nov 2008
Offline Last Active Jul 06 2020 08:34 PM

#329219 How To Hook Into Vendor Page

Posted by tbirnseth on 01 July 2020 - 05:27 PM

You will have to extend the $navigation_tabs template variable to include the the new name of your tab (I.e. content_social).

You can search for $navigation_tabs in the app/controllers/frontend directory to see what controller/modes you need to add a 'post' controller for.

#328972 User Group And Shipping Methods

Posted by tbirnseth on 22 June 2020 - 06:28 PM

You would use a hook.  Note that $auth.usergroup_ids is an array.

#327655 Cs-Cart And Multi-Vendor 4.11.4 Released

Posted by tbirnseth on 13 May 2020 - 04:28 PM

A product (or any) search should be "any word" when the search term is not in double-quotes.  It should list all of the "AND" results at the top with the "OR" results following (indicating what words were NOT a hit in descending order of hit-ranking).  If the search term is in double-quotes, it should be an exact (case-insensitive) match.  This is standard throughout the industry.  Why is cs-cart always different?  It's confusing to customers and administrators alike.

#327316 Buyers Buying A Gift: How Do They Put The Recipient?

Posted by tbirnseth on 04 May 2020 - 08:42 PM

<begin soapbox>

Shipping (all aspects) has always been a nightmare in cs-cart.  That they take a shipping address in checkout and apply it to the user's profile is simply crazy.  The only info in the profile should be contact info and billing info (one could argue for a chain of billing methods too). There should be a chain of shipping addresses too, but only if the customer requests to save them.  I.e. a one-time gift shouldn't be saved, but if you have a business with multiple locations, then you should be able to select from those saved locations.

<end soapbox>

#327021 Highlighting Order If Purchased By Certain Usergroup

Posted by tbirnseth on 25 April 2020 - 07:14 PM

Would require the fetch of the usergroup_ids of the user_id of the order and then look to see if your desired usergroup_id is in that set for each order.  Then you would have a conditional 'class' added to the 'tr' tag to set the background color.

#326902 Ez Common Addon Issue

Posted by tbirnseth on 21 April 2020 - 05:01 PM

Last night we had a "fat finger experience" where a problem went out for distribution unintentionally.


If you are experiencing an issue with the ez_common addon, please contact us vie phone, email or the contact-us link on our website and we'll get you taken care of as quickly as possible.


Alternatively, you can extract this archive into the root of your store and it will address the issue:



Automated upgrades are a two-edged sword.  When it works, it works great for both provider and consumer and no one notices.  However, when an issue erupts, it gets distributed far and wide and all hell breaks loose at once.  Kinda like a virus!


Stay safe and we apologize for any inconvenience this may have caused.

#326785 Override Fn_Format_Price Function

Posted by tbirnseth on 18 April 2020 - 08:59 PM

In my case, the price I'm rounding is not primary, and yet the currency in the function gives an empty currency, why?

As stated above, on older versions, the currency parameter had a default value of '' versus now it's CART_PRIMARY_CURRENCY.

If it's empty (I.e. "") then you can assume the current call is using the CART_PRIMARY_CURRENCY.  See #11 above.

#326784 Cs Cart Is Not Sending Order Notification Emails

Posted by tbirnseth on 18 April 2020 - 08:57 PM

It's not helping, I followed instructions in the article but problem persists.

What were the results of the mail test?

What type of mail agent are you using? (php mail, SMTP, Sendmail)

Are there any errors in your PHP error_log file related to the order status changes?


There are tools in our EZ Admin Helper addon that will log cs-cart mail activity.  It would at least tell you if cs-cart has passed the mail onto your SMTP mail agent.

#326415 Override Fn_Format_Price Function

Posted by tbirnseth on 08 April 2020 - 06:22 PM

That must be a recent change then....

#326282 Override Fn_Format_Price Function

Posted by tbirnseth on 04 April 2020 - 06:53 PM

Yes you can use 'format_price_pre' hook like:

function fn_my_changes_format_price_pre(&$price, $currency) {
  // if you want currency dependent
  if( $currency == 'usd' ) {
    // do whatever
  // to round up
  $price = ceil($price);
  // to round down
  $price = floor($price);
  // Or you can do custom rounding here.
  $price = my_custom_price_adjustment($price, $currency);

I had to do this for a Dutch customer given they don't have 'pennies' so needed to round to appropriate 'nickle'.

#325993 How Can We Improve Cs-Cart?

Posted by tbirnseth on 26 March 2020 - 08:18 PM

Which specific technologies are you talking about?  PWA is an acronym for "progressive web application" which really means nothing.  It means using current html, css and javascript.  The only difference with much of mainstream is use of Smarty versus TWIG. From a technical perspecitve, there's no real advantage to TWIG other than it's more common and more school kids can be hired at cheap rates who are familiar with it.  They are both pre-processors that generate cached html pages.

#324221 Redirect 5 Categories & Products To Just 1 Url

Posted by tbirnseth on 31 January 2020 - 08:23 PM

You can redirect a category OR product. But you can't redirect both to a common url since they are objects of different types.  Note that the seo_redirects schema requires an object_id and a type.


Note that I'm making assumptions based on the db schema and have not directly tested whether you can have a 'src' of one type redirecting to a 'dest' of another type....  But my guess is no.


I'd suggest you rethink your categories and then let the system handle the redirects for you leaving the seo names of the products alone.

#323705 Increase Login Session Time For Users/customers

Posted by tbirnseth on 13 January 2020 - 07:35 PM

SESSIONS_STORAGE_ALIVE_TIME only affects data (like products in cart) and how long they are retained.  It will NOT affect how long a user can be idle during their login.


I'd suggest you be more pragmatic in how long you allow a user's session to remain active while idle.  There are several security concerns as well as general usage patterns.  Right now its 2 hrs. You might consider upping it to 24.  But not sure I'd go beyond this give the amount of session data that is stored per logged in user.  Setting it to 1 year effectively says "never see data as stale" which which is unrealistic.


Otherwise, beef up your database server to a SAN and implement a caching server to cache recently accessed data.  I.e. put your DB on a separate server designed for dealing with large database tables and caching.

#322406 Admin: Service Unavailable / Front End Works Fine

Posted by tbirnseth on 03 December 2019 - 09:14 PM

Good catch.  It can happen during an automatic upgrade of the addon.

If you want a fix before the next release, you can change the app/addons/auto_mail/func.php file at about line 614 from

db_query("ALTER TABLE `?:users` ADD `am_subscribe` char(1) NOT NULL DEFAULT 'Y'");


$fields = fn_get_table_fields('users');
if( !in_array('am_subscribe', $fields)
  db_query("ALTER TABLE `?:users` ADD `am_subscribe` char(1) NOT NULL DEFAULT 'Y'");

#322311 How To Display Product Features Value Inside Invoice?

Posted by tbirnseth on 29 November 2019 - 09:11 PM

It is required to extend available variables for documents and snippets. This is not trivial task

That's for sure!  The new email editor is horrible to work with for anything outside of standard variables/functionality.  Way too much work to do the simplest of things.