Phil, Sure it is working as expected,
In my previous method you can find following phrase: ‘So I’ve done following thing, removed title for sellables by setting empty title.’
But still, in order titles for sellables are not changed. That’s what I’m asking about.
So, I’ve done following thing:
prepare = []
[6] pry(main)> ids = product[:sellables].pluck(:id)
=> [13490719, 13490718, 13490720, 13490717]
[7] pry(main)> ids.each do |id|
[7] pry(main)* prepare << {id: id, title: ''}
[7] pry(main)* end
=> [13490719, 13490718, 13490720, 13490717]
[8] pry(main)> prepare
=> [{:id=>13490719, :title=>""}, {:id=>13490718, :title=>""}, {:id=>13490720, :title=>""}, {:id=>13490717, :title=>""}]
[9] pry(main)> Veeqo::Product.update(8027317, {product: {product_variants_attributes: prepare}}.merge(connection: User.last.veeqo_connection))
That request updated all titles to ‘’, just making them empty.
In my order I do see following thing
Title here is Diesel Jacket - Diesel Jacket
I want to remove that duplication in title for already existing orders(So I want to have just Diesel Jacket left. Duplication is because I’ve assigned title for sellable, now I want to remove it).
But still, if I open that product, there is no title assigned for sellables. It seems that order has it’s own cached products inside, that are without connection to their originals that are in products tab.
So what exactly I want to do:
I’ve had this picture
Now I want this
Making sellable title disappearing from that field under order number, and everywhere else.
If you have an questions or don’t understand what I’m asking about, maybe it will be easier to make a call?