Links to code fixes previously provided that can be used as is or a hint for other fixes, I will add to it as I come across more.
CODE CHANGES HOW TO
- Filtering & Sorting
- Images
- Image sizing
- Order Management
- Product Options
- Vendor Management
- API & Authentication
- Display data / Tweaking templates
- Promotions
- Checkout
- Linking
- Other
CSS HOW TO
SMARTY/CS-CART VARABLES/
Print out store vairables
Working with custom vairables
Adding vendor vairable to template - see 27 Apr 2024
In documents / Email Templates
The last e-mail in a thread in notifications message centre {{ last_message }}11/12/24
- User Vairables
{{u.email}}
{{u.b_city}}
{{u.b_country_descr}}
{{u.b_phone}}
{{u.b_zipcode}}
- Company Vairables
- {{ company.users_department_display }}
- {{ company.site_administrator_display }}
- {{ company.orders_department_display }}
- {{ company.support_department_display }}
- {{ company.newsletter_email_display }}
- Shipping Vairables
In Blocks
- Email:
{$settings.Company.company_users_department}
- Quantity available:
{$product.amount}
- Operating Hours:
{__('weekday_abr_1')}-{__('weekday_abr_0')} 9.00 - 18.00
- Phone:
{$settings.Company.company_phone}
- State:
{$settings.Company.company_state|fn_get_state_name:$settings.Company.company_country}
8 Likes
I don’t know if this counts as a code tip, but we use it from time to time.
If you want to disable ajax when changing order statuses (so that printing inside functions responsible for order status changes works), do the following changes in code.
In file /design/backend/templates/common/select_popup.tpl in line:
<li {if $status == $st}class="disabled"{/if}><a class="{if $confirm}cm-confirm {/if}status-link-{$st|lower} {if $status == $st}active{else}cm-ajax cm-post{if $ajax_full_render} cm-ajax-full-render{/if}{/if} {if $status_meta}{$status_meta}{/if}"{if $status_target_id} data-ca-target-id="{$status_target_id}"{/if} href="{"`$_update_controller`.update_status?id=`$id`&status=`$st``$extra_params``$dynamic_object`"|fn_url}" onclick="return fn_check_object_status(this, '{$st|lower}', '{if $statuses}{$statuses[$st].params.color|default:''}{/if}');" {if $st_result_ids}data-ca-target-id="{$st_result_ids}"{/if} data-ca-event="ce.update_object_status_callback">{$val}</a></li>
remove the parameter cm-ajax,
and from the line:
div class=“cm-popup-box dropleft {if !$hide_for_vendor}dropdown{/if} {$popup_additional_class}”
remove the parameter cm-popup-box.
Note this this has some consequences, for example it causes e-mail notifications to not send, so it’s something that should be used only in development environment.
This isn’t cs-cart specific and is general utility so posting in a seperate box.
Utilitiy code
Upsize small images upto 100px minimum
Please like the top post … I still update it if I find a useful post. This post is about to drop off my most liked posts list, which will make it hard to find.
Even better if someone has a chatgpt plus subscription (I think a plus subscription can crawl hyperlinks?) and ask it to …
“Create a cs-cart developers tips and tricks guide, include a example from each of these forum topics under seperate headings, credit the solution provider in each case e.g. ‘suggested by [user_id]’ (where [user_id] is the forum user ID who contributed to forum topic). Group related results together …” … and then copy in the first topic. Chat GPT might spit out rubbish but it might spit out something useful for us cs-cart coding numpties…
1 Like