当我尝试时我得到Error while turning on Settings Sync: Authentication failed.:
Settings Sync: Turn On...> Sign in & Turn on> {account name} (GitHub) Last Used with sync.
Settings Sync: Show Log显示:
[settingssync] [info] Using settings sync service https://vscode-sync.trafficmanager.net/
[settingssync] [info] Auto Sync is disabled.
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/manifest","status":401,"execution-id":"bbf1a818-0556-46db-aa3b-2da51e10ef6f"}
[settingssync] [info] Settings Sync auth token failed github false
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/settings","status":401}
[settingssync] [info] Settings Sync auth token failed github true
[settingssync] [info] Request failed {"url":"https://vscode-sync.trafficmanager.net/v1/resource/keybindings","status":401} …Run Code Online (Sandbox Code Playgroud) windows synchronization github visual-studio-code sync-settings
每次启动 VS Code 时,系统都会要求我登录 GitHub以启用GitHub Copilot建议。不管这样做很多次。
我有点困惑,因为我也有 GitLens 扩展,它工作得很好。
还有其他人遇到过类似的事情吗?
操作系统:Ubuntu 20.04.3 Focal Fosa
是否可以开箱即用或使用扩展在Visual Studio Code的命令面板中添加自定义命令,如JetBrains的 IDE或Visual Studio中的“外部工具” ?
我希望能够直接从命令面板运行自定义bash / cmd命令。
我有一个可配置的产品,有多种不同的颜色和尺寸可供选择。我希望可配置产品为每种颜色出现一次。我的想法是将每种颜色的可配置产品的一个简单产品分配给可配置产品的类别。然后我想更改列表,以便(彩色)简单产品链接到它的主产品(可配置产品)。
另一种方法是,将可配置产品分配到一个类别,然后用不同的颜色多次列出它。但我认为这太复杂了。
解决方案
真诚地,我丢失了我的代码。但这是我的管理方法:
visibility对所有从属产品进行设置catalog,以便它们出现在产品列表中 public function getProductUrl($useSid = null)
{
$product = $this;
$product->loadParentProductIds();
$parentIds = $product->getParentProductIds();
if(count($parentIds) > 0 && $product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE)
{
$parent = Mage::getModel("catalog/product")->setId($parentIds[0])->load();
return $this->getUrlModel()->getProductUrl($parent, $useSid);
}
return $this->getUrlModel()->getProductUrl($product, $useSid);
}
Run Code Online (Sandbox Code Playgroud)
这样,每个从属产品都链接到它的主产品。棘手的部分是将属性附加到 url。您可以添加#attributecode1=value1&attributecode2=value2到 url 以预选属性选择框。我只把这部分做得又快又脏,而且我很确定有人可以做得更好。
预选示例:
http://demo.magentocommerce.com/anashria-womens-premier-leather-sandal-7.html http://demo.magentocommerce.com/anashria-womens-premier-leather-sandal-7.html#502=43